- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm not too familiar with VBA but I have been using iLogic in order to set up some basic data on some part/assembly-files. I cannot create myself a different template, as my company restricts this.
Thing I need:
- New custom iProperties. I've been using iProperties.Value-snippet.
- New parameters, with certain formatting. For this i have used iLogic, shown below:
doc = ThisDoc.Document 'Defining document and providing access to parameters on different levels.
Dim oPartCompDef As PartComponentDefinition = doc.ComponentDefinition
Dim oParams As Parameters = oPartCompDef.Parameters
Dim oUserParams As UserParameters = oParams.UserParameters
oUserParams.AddByValue(“XXX_LENGTH”, 0, “mm”) 'Creating needed XXX-parameters.
oLength = Parameter.Param("XXX_LENGTH") 'Defining Custom Properties for parameter
oLength.ExposedAsProperty = True
oFormat=oLength.CustomPropertyFormat
oFormat.PropertyType=Inventor.CustomPropertyTypeEnum.kTextPropertyType
oFormat.Precision=Inventor.CustomPropertyPrecisionEnum.kZeroDecimalPlacePrecision
My question is, how could I create a button to my Inventor ribbon, that could run these kind of iLogic codes?
-Ossi
Solved! Go to Solution.