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

Adding fields in data shapes at run time from Windchill Object

PreetiGupta
Aquamarine

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.

Tags (1)
4 REPLIES 4

Re: Adding fields in data shapes at run time from Windchill Object

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

Load DataShape:

var dataShapeReference = DataShapes["dataShapeName"];

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

Re: Adding fields in data shapes at run time from Windchill Object

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

Re: Adding fields in data shapes at run time from Windchill Object

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

Re: Adding fields in data shapes at run time from Windchill Object

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.

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.