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.
Can I tell if a part property has already been set?
EvanReese
Member, Mentor Posts: 2,135 ✭✭✭✭✭
If a part property has been manually set, it can't be set by FeatureScript. I'm wanting to write a general-use function that can be used by any property-setting feature which can tell whether it's worked or not, and provide a message with instructions on re-setting properties if not. Seems like getProperty can't be used in the main feature function. I tried using it in editing logic, but even if the main function sets the name, it still only returns the pre-feature name. Can this be done? It seems like it could be useful to lots of people writing features, not just me.
Here's what I've tried so far: https://cad.onshape.com/documents/87f7a0c59449e08d9aa23e09/w/0badf39844ddae5eda7380ea/e/6258d6bf25bd8fed2b987dcd
Here's what I've tried so far: https://cad.onshape.com/documents/87f7a0c59449e08d9aa23e09/w/0badf39844ddae5eda7380ea/e/6258d6bf25bd8fed2b987dcd
Evan Reese
2
Best Answer
-
lana Onshape Employees Posts: 706Unfortunately, we don't know at the time of regeneration if setProperty would have the desired effect. a. A later feature might override that property, b. Interactively assigned properties are always applied at the end of regeneration.
So it is really a question about the future.
1
Answers
So it is really a question about the future.