Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:

  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

What is the relationship between context in the editingLogic function and in the feature?

dave_cowdendave_cowden Member, Developers Posts: 445 ✭✭✭
Based on a simple experiment with set/get Variable, it seems that the context passed to the editingLogic function and the context passed to the feature are not the same. This surprised me.

I'm looking at a use case in which the editingLogic function needs to construct some geometry in order to adjust user inputs. I'd like to avoid repeating these calculations again in the feature, but then i need these constructions to be accessible ( and mutable ) by the feature.

If I create geometry in the editingLogic function, are those things accessible and mutable if thy are passed to the feature via the definition?

I know that performance will be a concern if i'm getting into creating geometry in the editingLogicFunction, but in this case, there's no way to make a nice-to-use feature without it.

Best Answer

Answers

  • dave_cowdendave_cowden Member, Developers Posts: 445 ✭✭✭
    As a side note, it was implied, but to make it clear: i would find it both more intuitive and more helpful if the context was shared between the editingLogic function and the feature itself...
  • dave_cowdendave_cowden Member, Developers Posts: 445 ✭✭✭
    Ok thanks, this answers the question. Sorry for not checking the docs first.


Sign In or Register to comment.