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.
exporting variables from one feature studio to another
prajwal_shankar
Member, Developers Posts: 11 ✭
for example if i have a variable as var pp = 1+5; in 'feature studio 1' and i want to use this variable in 'feature studio 2' as var pp1 = pp+1;
can this be done? as in exporting values and quires from one feature studio to another? if so how should it be done and what is the syntax of coding to be followed? I'm kind of a 'newbie' to coding....so please go easy on the technical stuff on programming
can this be done? as in exporting values and quires from one feature studio to another? if so how should it be done and what is the syntax of coding to be followed? I'm kind of a 'newbie' to coding....so please go easy on the technical stuff on programming
Tagged:
0
Comments
In FS1:
export const pp = 1 + 5;
in FS2:
import(... FS1 ...); // generated by clicking the import button
const pp1 = pp + 1;
@Ilya_baran - my question here was basic but let me state my exact problem. lets say i create two points on a sketch using feature script in 'feature studio 1' and lets say i want to create a line between these two points but using a separate feature script i.e. in 'feature studio 2' . how can i reference the points in feature studio 1 to feature studio 2?????
yes you are right at the end and that is what i want to achieve. i want the sketch with two points in FS1 and using those two points i want to create a line in FS2 . how do i 'reference' features from one FS to another and i know that FS's arent interactive but atleast there should be a one way connection somehow!!!!!
is this possible to achieve this at the moment?????
However, since I'm missing the context and intent of what you want to accomplish, I'm not sure if this is what you're looking for.
** It has to be reactive in such way that if i change the coordinates of the points in FS1 then the Line created thru FS2 should be updated accordingly.
I can't think of why doing it that way would be useful, so there's a second (much simpler) feature in there that makes a line controlled by coordinates in another feature studio.
This is perfect.....exactly what i needed. Thank you so much