Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Using the custompropertyID to show custom property in a custom table
john_allen289
Member Posts: 38 PRO
Can someone show me the correct syntax to use the customPropertyID with PropertyType.CUSTOM?
I just can't get it to work for some reason (mostly because I have almost no idea what I'm doing with FS!), but trying hard to learn.....
var custom1 = getProperty(context, { "entity" : part, "propertyType" : PropertyType.CUSTOM, "custompropertyID" : 5f15b2e90eb1e3150e07046f } );
I just can't get it to work for some reason (mostly because I have almost no idea what I'm doing with FS!), but trying hard to learn.....
var custom1 = getProperty(context, { "entity" : part, "propertyType" : PropertyType.CUSTOM, "custompropertyID" : 5f15b2e90eb1e3150e07046f } );
Tagged:
0
Best Answers
-
NeilCooke Moderator, Onshape Employees Posts: 5,683The ID is a text string so put it in quotes.Senior Director, Technical Services, EMEAI0
-
Alex_Kempen Member Posts: 248 EDUIt looks like one issue you may have been having is that you've misspelled customPropertyId. Keys are string arguments, so enclosing them in quotation marks is fine (unless you want to use a variable defined elsewhere as a key). Thus, your line of code should actually look something like the following:
var custom1 = getProperty(context, { "entity" : part, "propertyType" : PropertyType.CUSTOM, "customPropertyId" : "5f15b2e90eb1e3150e07046f" });
CS Student at UT DallasAlex.Kempen@utdallas.eduCheck out my FeatureScripts here:0
Answers