Drawinf file open from assembly and run external rule

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all
i have problem in the following code, my idea is to open drawing from assembly and update all the sheets (with help of external rule), can anyone please let me know where is the problem in my code
thanks
v.sureshkumar
Dim oCurrentSheet As Sheet
' Iterate through the sheets
Dim oSheet As Sheet
FullFilename = ThisDoc.Path & "\drawings"& "\Panel_assy_LAVT.idw"
Dim oDrawDoc as DrawingDocument = ThisApplication.Documents.Open(Fullfilename)
oDrawDoc.Activate
For Each oSheet In ThisDoc.Document.Sheets
oCurrentSheet = ThisDoc.Document.ActiveSheet
oSheet.Activate
iLogicVb.RunExternalRule("Auto_dim_arrangement")
iLogicVb.RunExternalRule("Update_all_sheet")
iLogicVb.RunExternalRule("Drawing_view_scale")
iLogicVb.UpdateWhenDone = True
oSheet.Update
Next
iLogicVb.RunExternalRule("Zoom_fit_drawing")
'return to original sheet
oCurrentSheet.Activate
MessageBox.Show("All Drawings Updated Successfully", "Panel Selection")