1
General Board / Re: Generate parts by associations through scripting
« on: October 04, 2024, 05:22:04 pm »
Yes its an embedded element (child of the block).
You will have to create the part element in your script and set its Parent_ID equal to the owning Block Element_ID.
BUT ... the "EA magic" that keeps the part association role name and multiplicity in sync is handled within our good old friend t_xref. The exact details I don't remember, its something like
XrefID,Name,Type,Visibility,Namespace,Requirement,Constraint,Behavior,Partition,Description,Client,Supplier,Link,
{BF1D8DE6-5274-40b0-AD03-7B05C4B6B036},CustomProperties,element property,Public, , , , ,0,@PROP=@NAME=_connectorRef@ENDNAME;@TYPE=string@ENDTYPE;@VALU=<SOURCE>@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;@PROP=@NAME=isReference@ENDNAME;@TYPE=boolean@ENDTYPE;@VALU=0@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;,{31294601-A49A-438f-AD49-59030143FD21},{DD41CA65-BE91-481b-919C-17AB0DFDB25D}, ,
In your script you will have to create this entry in t_xref which will involve you creating a new guid for the new t_xref record.
Have fun!
Phil
You will have to create the part element in your script and set its Parent_ID equal to the owning Block Element_ID.
BUT ... the "EA magic" that keeps the part association role name and multiplicity in sync is handled within our good old friend t_xref. The exact details I don't remember, its something like
XrefID,Name,Type,Visibility,Namespace,Requirement,Constraint,Behavior,Partition,Description,Client,Supplier,Link,
{BF1D8DE6-5274-40b0-AD03-7B05C4B6B036},CustomProperties,element property,Public, , , , ,0,@PROP=@NAME=_connectorRef@ENDNAME;@TYPE=string@ENDTYPE;@VALU=<SOURCE>@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;@PROP=@NAME=isReference@ENDNAME;@TYPE=boolean@ENDTYPE;@VALU=0@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;,{31294601-A49A-438f-AD49-59030143FD21},{DD41CA65-BE91-481b-919C-17AB0DFDB25D}, ,
In your script you will have to create this entry in t_xref which will involve you creating a new guid for the new t_xref record.
Have fun!
Phil