Message 1 of 2
Update copied properties command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I want to update the Iproperties of a drawing file using Ilogic. I have found a section of code for doing so and it works fine however, it does not work when the rule in the drawing file is triggerd from the assembly file.
I am using the following code to trigger the rule in the drawing from the assembly:
Sub GenerateDrawings()
'open known drawing document specifying full filename
FullFilename = ThisDoc.Path & "\" & ThisDoc.FileName(False) & ".idw"
Dim oDrawDoc As DrawingDocument = ThisApplication.Documents.Open(FullFilename, True)
'run rule in the drawing document
auto = iLogicVb.Automation
auto.RunRule(oDrawDoc, "Drawing configuration")
'you may also save and close this drawing document
oDrawDoc.Save
oDrawDoc.Close
End Sub
And then the following code to run inside my drawing file:
InventorVb.DocumentUpdate()
iLogicVb.UpdateWhenDone = True
Dim updateCmd As ControlDefinition
updateCmd = ThisApplication.CommandManager.ControlDefinitions.Item("UpdateCopiedModeliPropertiesCmd")
updateCmd.Execute2(True)
Any suggestions to fix this problem?
Thanks in advance!
Niek