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.

Options

Charted Drawings

JPMJPM Member, csevp Posts: 19 ✭✭

I'm looking to set up a charted drawing part length, driven by a configuration variable. I'd like it to auto fill the part number property when a new length is set through the configuration variable. I've searched the forum and I didn't see any clear solution or path. Has anyone done this?

Thanks!

Comments

  • MichaelPascoeMichaelPascoe Member Posts: 2,368 PRO
    edited June 3

    .

    I don't quite understand what you trying to do, but you can set part properties like the part number via custom features which can be configured or they can reference configuration variables as inputs.

    To turn an input into an expression input which can take variables, just right click the input box and convert to expression.

    Property / Attribute custom feature
    https://forum.onshape.com/discussion/comment/115249…

    .


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • JPMJPM Member, csevp Posts: 19 ✭✭
    edited June 3

    @MichaelPascoe I'd like to chart the length of a plate on a drawing instead of making a new drawing for any random length that might be needed in the future. Part number in the BOM would be something like 100030 X 5.00, Where the "100030 X" is the part number proper and the "5.00" would change in the BOM depending on the length needed. (Possibly wouldn't need a chart on the drawing, just an explanation that the length to cut is the last digits of the part number.)

    The real problem is getting a user entered length to auto fill in the part number. I've tried the Property / Attribute custom feature and can't get it to use the configured variable. What I've tried:

    1.Created a configuration variable #ext_pl_lg

    2. Set Sketch dimension to #ext_pl_lg variable

    2. I reset the part properties

    3. Use the custom feature by calling out the configured variable #ext_pl_lg and setting it to convert to expression.

    image.png

    It only displays the variable name.

    image.png
  • MichaelPascoeMichaelPascoe Member Posts: 2,368 PRO
    edited June 3

    Right click the Part number input from within the feature and Convert to expression. This will let you use variables as inputs. You can add variables and strings together like this "xyzNameOfYourPart " ~ #variableName


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • JPMJPM Member, csevp Posts: 19 ✭✭
    edited June 4

    @MichaelPascoe It worked, thank you! One more question, is there a way to use Set/Property on a custom property? I have a "Sort Order " property we use for BOM sorting and it needs almost the same info.

    I figured it out. Thanks for your help!!

Sign In or Register to comment.