Anonymous
in reply to:
Anonymous
09-01-2016
03:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-01-2016
03:07 PM
The code below should get you pointed in the right direction. It just adds multi-value Parameters and changing User Parameter. I hope this helps in some way.
SyntaxEditor Code Snippet
Imports Inventor.UnitsTypeEnum Dim oAssemblyDoc As Document oAssemblyDoc = ThisDoc.Document If oAssemblyDoc.DocumentType = kAssemblyDocumentObject Then Dim oAssemblyCompDef As AssemblyComponentDefinition oAssemblyCompDef = oAssemblyDoc.ComponentDefinition Dim oParams As Parameters oParams=oAssemblyCompDef.Parameters Dim oUserParams As UserParameters oUserParams=oParams.UserParameters Dim oAwesomeParameter As Parameter Try otester = oUserParams.Item("PK_Extended_Item_Description") Catch oInsulationType=oUserParams.AddByValue("PK_Extended_Item_Description", "General", kTextUnits) MultiValue.SetList("PK_Extended_Item_Description", "Manufacturing", "Purchasing", "General", "Customer Order", "Phantom") End Try End If Parameter.Param("PK_Extended_Item_Description").ExposedAsProperty = False Parameter.Param("PK_Extended_Item_Description").IsKey = False