I have a macro that I am using to fill titleblock information using custom sheet properties defined in the titleblock area. I have radio buttons setup to fill in tolerances for coarse, medium, or fine. The tolerances are different for metric or imperial. I need to be able to do a check to see if the drawing is metric or imperial then fill the appropriate tolerance. I cannot seem to get the VB code right to check the sheet.
Here's a sample of what I was trying but it always fills imperial.
If OptionButton1.Value = True Then 'Coarse selection 'check for standard english borders If swDwgPaperSizes_e = swDwgPaperDsize Or swDwgPaperCsize Or swDwgPaperBsize Or swDwgPaperAsize Then retval = drawingdoc.DeleteCustomInfo("TOLERANCE1") retval = drawingdoc.AddCustomInfo("TOLERANCE1", "Text", "0.1") retval = drawingdoc.DeleteCustomInfo("TOLERANCE2") retval = drawingdoc.AddCustomInfo("TOLERANCE2", "Text", "0.03") retval = drawingdoc.DeleteCustomInfo("TOLERANCE3") retval = drawingdoc.AddCustomInfo("TOLERANCE3", "Text", "0.010") Else 'assume metric borders retval = drawingdoc.DeleteCustomInfo("TOLERANCE1") retval = drawingdoc.AddCustomInfo("TOLERANCE1", "Text", "3.0") retval = drawingdoc.DeleteCustomInfo("TOLERANCE2") retval = drawingdoc.AddCustomInfo("TOLERANCE2", "Text", "1.0") retval = drawingdoc.DeleteCustomInfo("TOLERANCE3") retval = drawingdoc.AddCustomInfo("TOLERANCE3", "Text", "0.25") End If End If