Hi to all,
i am new in writing the VBA code.
i have one drawing which have title block , notes and some view.
Block fileds are linked with the custom properties with i created in drawing.
Few notes are connected to the part by leader and these notes are also linked with the custom properties.
Now
Just i wrote a VBA code to open a drawing and to delete/add those custom properties and then rebuild the drawing.
in this process all fileds in tile block and note ( which is not having leader) are updating but those note which connected to the view by leader are not updating.
please help me
Portion of Code:-
'Assignment of properties in drawing
Part.DeleteCustomInfo ("WBS")
retval = Part.AddCustomInfo3("", "WBS", swCustomInfoText, Val(WBS))
Part.DeleteCustomInfo ("Contract")
retval = Part.AddCustomInfo3("", "Contract", swCustomInfoText, ContractNumber)
Part.DeleteCustomInfo ("Project")
retval = Part.AddCustomInfo3("", "Project", swCustomInfoText, ProjectName)
Part.DeleteCustomInfo ("Revision")
retval = Part.AddCustomInfo3("", "Revision", swCustomInfoText, Val(Revision))
Part.DeleteCustomInfo ("DrawnDate")
retval = Part.AddCustomInfo3("", "DrawnDate", swCustomInfoText, DrawnDate)
Part.DeleteCustomInfo ("DrawnBy")
retval = Part.AddCustomInfo3("", "DrawnBy", swCustomInfoText, DrawnBy)
Part.DeleteCustomInfo ("CheckedBy")
retval = Part.AddCustomInfo3("", "CheckedBy", swCustomInfoText, checkedby)
Part.DeleteCustomInfo ("Material")
retval = Part.AddCustomInfo3("", "Material", swCustomInfoText, Material)
Part.DeleteCustomInfo ("Quantity")
retval = Part.AddCustomInfo3("", "Quantity", swCustomInfoText, Val(Quantity))
Part.DeleteCustomInfo ("Title")
retval = Part.AddCustomInfo3("", "Title", swCustomInfoText, Title)
Part.DeleteCustomInfo ("Sketch No")
retval = Part.AddCustomInfo3("", "Sketch No", swCustomInfoText, SketchNo)
Part.DeleteCustomInfo ("Elevation")
retval = Part.AddCustomInfo3("", "Elevation", swCustomInfoText, Elv)
Part.DeleteCustomInfo ("Sketch No2")
retval = Part.AddCustomInfo3("", "Sketch No2", swCustomInfoText, SketchNo2)
Part.DeleteCustomInfo ("Weld")
boolstatus = Part.EditRebuild3()