Message 1 of 6
Change Parameter from selected part
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello together,
this code works for parts. But how to change it that it works for assemblys? I would like to select a part and than change the value.
m_invApp = GetObject(, "Inventor.Application")
' Get the Parameters object. Assumes a part or assembly document is active.
Dim oParameters As Parameters
oParameters = m_invApp.ActiveDocument.ComponentDefinition.Parameters
' Get the parameter named "Length".
Dim oLengthParam As Parameter
oLengthParam = oParameters.Item("Diam")
' Change the equation of the parameter.
oLengthParam.Expression = TxtBox10.Text
' Update the document.
m_invApp.ActiveDocument.Update()
Thanks
Georg