Message 1 of 2
Use new feature "DrawingReplaceModelReferenceCmd" from Advantage Pack 2010

Not applicable
10-26-2009
09:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would like use the new command "DrawingReplaceModelReferenceCmd" in VBA?
How setting reference files and notify the change?
Dim oNewDraw As DrawingDocument
Set oNewDraw = ThisApplication.Documents.Open(Newfile2, False)
' Get the CommandManager object.
Dim oCommandMgr As CommandManager
Set oCommandMgr = ThisApplication.CommandManager
' Get control definition for the line command.
Dim oControlDef As ControlDefinition
Set oControlDef = oCommandMgr.ControlDefinitions.Item( _
"DrawingReplaceModelReferenceCmd")
oNewDraw.(command for Replace Model Reference).item(1) (oldfile, newfile)
' Execute the command synchronously.
Call oControlDef.Execute2(True)
Or if exist otherway for execute the replace?
Tks in advance.
How setting reference files and notify the change?
Dim oNewDraw As DrawingDocument
Set oNewDraw = ThisApplication.Documents.Open(Newfile2, False)
' Get the CommandManager object.
Dim oCommandMgr As CommandManager
Set oCommandMgr = ThisApplication.CommandManager
' Get control definition for the line command.
Dim oControlDef As ControlDefinition
Set oControlDef = oCommandMgr.ControlDefinitions.Item( _
"DrawingReplaceModelReferenceCmd")
oNewDraw.(command for Replace Model Reference).item(1) (oldfile, newfile)
' Execute the command synchronously.
Call oControlDef.Execute2(True)
Or if exist otherway for execute the replace?
Tks in advance.