Driving the Drawing Title in a Component Family Resolution

 Hello everyone,

By default, after resolving a Component Family, all attached drawings share the same title, whereas some customers prefer to have a unique title for each drawing.

I explain below how you can map the drawing titles with an Excel table column contained in the generic model:

 

1/ In your generic 3D Part/Product, add a new parameter which must be mapped with the Excel column dedicated for drawing names

 

2/ In a separate 3DPart/Product, create a new Action with this EKL code (Engineering Rules Capture App):

/*

Argument:

rep: VPMRepReference

*/

 // Access the reference aggregating the current 3DShape (rep)

let ref (VPMReference)

set ref = rep.AggregatingReference 

// Find the drawing under the reference

let Drw (Drawing)

Drw = ref.Find( "Drawing"""true

// Find the PartFeature object, which is required to access any feature inside the 3DShape

let pf (PartFeature)

pf = rep.Find( "PartFeature"""true

// Get the parameter that is mapped with the drawing number column from the design table

// Here the parameter is also named "DrawingNumber" but it doesn't have to be that way

let drwNumber (String)

drwNumber = pf.GetAttributeString("DrawingNumber"

// Finally assign the value of the parameter (i.e. the value from the column of the design table) to the title of the drawing

Drw.SetAttributeString("V_Name", drwNumber)

 

3/ Open the Data Setup App with the Owner role and in the Component Family Resources/ActionAfter category, select the Action previously created

 

4/ Bind the Resource to the Collaborative Space(s)

 

5/ Resolve the Component Family

 

component family