cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Adding fields in data shapes at run time from Windchill Object

PreetiGupta
14-Alexandrite

Adding fields in data shapes at run time from Windchill Object

Wondering if there is a way to add a field in data shape dynamically? Example - In Windchill CAD document, if a new IBA is added. Is there a way to get this attribute added to data shape as a field pragmatically? Today  I have to add this new attribute manually into data shape. Same in mashup.

thanks.

4 REPLIES 4

Yes it's, I create DataShape's on demand

Load DataShape:

var dataShapeReference = DataShapes["dataShapeName"];

dataShapeReference.AddFieldDefinition({ name: "newFieldName", type: "FIELD_TYPE", ordinal: 9 });

PreetiGupta
14-Alexandrite
(To:CarlesColl)

thanks Carles for replying. Have you used CreateDataShape service in PTC-Windchill-Demo-Thing?

No we don't use Windchill / Windchild extension. But CreateDataShape it's not related to WindChild extension it's a standard TW feature.

PreetiGupta
14-Alexandrite
(To:PreetiGupta)

yes Carles.

My findings so far on this is - we can get IBA information from CreateDataShape service. The IBAs on WIndchill Object needs to be added manually to the data shape. This is not good. It really takes away configurability.

Top Tags