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.

Multiple use for imported parts

Dylan_StewartDylan_Stewart Member, Developers Posts: 106 PRO
Okay, I'm going to try and explain this to the best of my ability (<--Feel like I've said that before?? :/)

So I have a profile that I am importing in to a FS..... easy enough...
Then, I turn it in to a function. 

export enum sealantProfileID
    annotation { "Name" : "1/16 inch" }

    annotation { "Name" : "1/8 inch" }

    annotation { "Name" : "1/4 inch" }

export function evsealantProfileID(value is sealantProfileID)
    return {
                "F72Dq47pUtYbudg_0" : .0625 * inch,
                "Fe9DDixnU9zeHn2_0" : .125 * inch,
                "FCofrjEa8xpUaY3_0" : .25 * inch
            }[value as string];

So my question is can I use this to extrude the imported profile PS while using it as a function? 
I have tried and I'm not having any luck....

Really, I would like to reduce the amount of options in UI and I thought I might be able to get 2 birds with 1 stone here.
Digital Engineering


  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 534
    You can use that enum to indicate both a sketch id and an extrude thickness via that function, yes.

    Can you share a document to give us a better idea of what you're trying to do?
  • Dylan_StewartDylan_Stewart Member, Developers Posts: 106 PRO
    Thank you @kevin_o_toole_1

    I got it figured out. I was actually calling the wrong sketch in my FS..... 
    Digital Engineering
Sign In or Register to comment.