- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have the code below, if I make the first and second blocks into seperate rules it runs perfectly, but If I try to run them sequentially in one rule or call both seperate rules from another rule, the second block runs before the first is completed and the desired result is missed. Is there a way to make sure the first block finishes completely before the 2nd block does it's thing?
Dim oDraw As DrawingDocument
oDraw = ThisApplication.ActiveDocument
oDraw.DrawingSettings.PreserveOrphanedAnnotations() = True
Dim oView As DrawingView
oView = ActiveSheet.View("VIEW1").View
oViewf = ActiveSheet.View("FLAT STATE").View
docname=ThisDoc.FileName(False) 'without extension
oView.ActiveMemberName = docname
oViewf.ActiveMemberName = docname
Dim hSheet As Sheet
hSheet = ThisApplication.ActiveDocument.Sheets.Item(1)
ThisApplication.ActiveDocument.SelectSet.Select(hSheet)
'Auto-Reattach Annotation
ThisApplication.CommandManager.ControlDefinitions.Item("DLxAnnoReconnectCmd").Execute
'Auto-Reattach Orphaned Annotations
ThisApplication.CommandManager.ControlDefinitions.Item("DLxAutoReattachSickAnnotationsCmd").Execute
Solved! Go to Solution.