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.
Need help on how to import Editing logic function from different feature studio
Kirankumar_Thimmegowda
Member Posts: 28 PRO
Hi,
I am trying to call editing logic function from other feature studio to current feature studio as shown below. It seems not working & i see nothing in old definition. Please help me on how to import it. Thanks.
export function fromCurrentFS(context, id, oldDefinition, definition, isCreating, specifiedParameters, hiddenbodies) returns map
{
fromOldFS(context, id, oldDefinition, definition, isCreating, specifiedParameters, hiddenbodies);
return definition;
}
I am trying to call editing logic function from other feature studio to current feature studio as shown below. It seems not working & i see nothing in old definition. Please help me on how to import it. Thanks.
export function fromCurrentFS(context, id, oldDefinition, definition, isCreating, specifiedParameters, hiddenbodies) returns map
{
fromOldFS(context, id, oldDefinition, definition, isCreating, specifiedParameters, hiddenbodies);
return definition;
}
0
Comments
definition=fromOldFS(context, id, oldDefinition, definition, isCreating, specifiedParameters, hiddenbodies);
return definition;
That's because FeatureScript is pass-by-value, not pass-by-reference
https://cad.onshape.com/FsDoc/variables.html