I have created a macro that will populate the title block fields in a specific border I set up, but I also want it to create the properties in previously used borders.
Can I use an IF statement in Visual Basic to determine if the fields exist? A snippet of my program is below. Currently my IF statement is not doing anything. Is there any other check I can perform in order to determine if the property needs to be created?
' Connect to a running instance of Solid Edge objApp = Marshal.GetActiveObject("SolidEdge.Application") ' Get a reference to the active document objDoc = objApp.ActiveDocument ' Get a reference to the document's property sets collection objPropertySets = objDoc.Properties objProperties = objPropertySets.Item("custom")
If objProperties.Item("drafter") Is Nothing Then objProperties.Add("drafter", "--") Else End If