This design is mostly used internally by the kBridge Inventor integration. By passing in the correct data to invParameters, Parameter will generate the right children (invParameter model) under the document.
We use this.invUnits when we set default values in a Design, and child.invUnits when we supply a value in a Child Rule.
BaseAssembly
InvObjectMixin
RULE NAME |
DESCRIPTION |
TYPE |
DEFAULTS |
CATEGORY |
FLAGS |
invUnits |
The default length units. "in", "mm", "cm" etc. |
String |
"in" |
Inventor |
Cached |
invParameters |
An array of parameter name, unit and parameter original name. This mostly acts a map between kbridge names and Inventor parameter names. The parameter original name is present since Inventor allows one to define the name with non-alphanumeric characters. For example: [{"ParameterName": "paramName", "ParameterUnits": "in", "ParameterOriginalName": |
Array |
[ ]
|
Inventor |
Cached |
Project Example
Reference Location:
'world.sculptparts.partsassemblysculpt.partsassemblysculpt0.myblocksculpt.myblocksculpt0'
Link: https://knowledgebridge.engineer/projects
Below, InvPartDocument has been mixed into ByBlockSculpt0, MyCylinderSculpt, and Sculpt. InvDocument is a mixin of InvPartDocument. InvParametersMixin is a mixin of InvDocument.
The invParameters map directly to Inventor Parameters:
Note: In invParameters rule, ParameterOriginalName has a value of "$InventorName*". KBridge can't have a name with symbols in it but Inventor may need to receive a name
with symbols.
For example, kBridge might have a rule named "LeftCorner" but Inventor has a rule named "Left_Corner"
{ParameterName: "LeftCorner", ParameterOriginalName: "Left_Corner"}
MyBlockSculpt0/invParameters value:
return | [{ParameterName: "length", ParameterOriginalName: "length",ParameterUnits: "in"}, |
{ParameterName: "width", ParameterOriginalName: "width",ParameterUnits: "in"}, |
{ParameterName: "height", ParameterOriginalName: "height", ParameterUnits: "in"}, |
{ParameterName: "KBName", ParameterOriginalName: "$InventorName*", ParameterUnits: "text"}]; |