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.
FeatureScript update feature dialog dynamically
graham_lock
Member Posts: 148 PRO
Hi all,
In the document below there is a property on definition "actualLength" which I want to use to update the read only field "Target edge length".
The idea is that a target edge is selected in the draft operation, and that as the draft angle is changed the read only field updates to show the current length of that target edge.
I have println statements which show that the edge is correctly measured after each call to opDraft but I cannot seem to update the UI?
https://cad.onshape.com/documents/ca5ee3b956b8f1c1fe2f7095/w/f6a389eb39e7b148f20e7c3b/e/4842fa268c0bf093a7b527c9
Any help appreciated.
Thank you.
In the document below there is a property on definition "actualLength" which I want to use to update the read only field "Target edge length".
The idea is that a target edge is selected in the draft operation, and that as the draft angle is changed the read only field updates to show the current length of that target edge.
I have println statements which show that the edge is correctly measured after each call to opDraft but I cannot seem to update the UI?
https://cad.onshape.com/documents/ca5ee3b956b8f1c1fe2f7095/w/f6a389eb39e7b148f20e7c3b/e/4842fa268c0bf093a7b527c9
Any help appreciated.
Thank you.
0
Best Answer
-
NeilCooke Moderator, Onshape Employees Posts: 5,688You have to use Editing Logic, which runs before the feature regenerates. If the edge is created by the feature then Editing Logic cannot access it. The only way you can do this is to work out the length with trig in the Editing Logic function.
Not a good idea to use a copy of the Draft feature as a starting point - there's too much "junk" in there which just confuses. Use opDraft.Senior Director, Technical Services, EMEAI0
Answers
Not a good idea to use a copy of the Draft feature as a starting point - there's too much "junk" in there which just confuses. Use opDraft.