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.

BOM ability to add part configuration property column?

mj_powersmj_powers Member Posts: 18 PRO
edited September 2018 in Data management
Just wondering if there is a way to add a specific part configuration property as a column item within the native Onshape BOM.

For example I have an assembly with several 2x4 lumber posts - each of different length.
Within the BOM they show as separate parts with the same exact name since they are from the same configuration part.
I must manually add the configuration properties built into the part in the "description" column  - in this example the length of the 2x4 post.

Thanks.



Comments

  • Don_Van_ZileDon_Van_Zile Member Posts: 195 PRO

    In the Configured Part Studio, you can add Configuration Specific Properties as shown:


  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,045 ✭✭✭✭✭
    Or you can set the description with a custom feature
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • lorenz_michelslorenz_michels Member Posts: 4 EDU
    I still don't get it. I have a part with different configurations and one configuration variable...

    and with the part properties there are some standard properties...

    in the bom i can't select my configuration variable "length" which is defined in the part studio but is determined in the assembly

    how to get the lengths in the bom?
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,935 PRO
    edited March 2019
    The BOM only shows Properties only.

    you will need to add a "Custom Property" to your company (PRO / Enterprise account required)

    otherwise you can use an easy featurescript to add your length to the name or description property.
    Keep in mind, once you manually edit any property, you can no longer use a featurescript to set it's value

    FeatureScript 1024; import(path : "onshape/std/geometry.fs", version : "1024.0"); annotation { "Feature Type Name" : "Add Length To Name" } export const NameLength = defineFeature(function(context is Context, id is Id, definition is map) precondition { annotation { "Name" : "Name" } definition.Name is string; annotation { "Name" : "My Length" } isLength(definition.myLength, LENGTH_BOUNDS); annotation { "Name" : "Part", "Filter" : EntityType.BODY && BodyType.SOLID && AllowFlattenedGeometry.YES, "MaxNumberOfPicks" : 1 } definition.entities is Query; } { const parts = evaluateQuery(context, definition.entities); var Name = definition.Name ~ " " ~ toString(roundToPrecision((definition.myLength / inch),2)) ~ " LG" ; if (parts == []) throw regenError(ErrorStringEnum.CANNOT_RESOLVE_ENTITIES, ["entities"]); setProperty(context, { "entities" : parts[0], "propertyType" : PropertyType.NAME, "value" : Name }); setProperty(context, { "entities" : parts[0], "propertyType" : PropertyType.DESCRIPTION, "value" : Name }); });

    https://www.youtube.com/watch?v=TKjgQH7WtCc
  • NikolaiNNikolaiN Member Posts: 6 ✭✭
    @lorenz_michels imho, there is no need for using custom props in your case. Suppose using configured part properties for "Name" and for "PartNumber" in part studio (as suggested by @Don_Van_Zile) is enough. Having that, you will see the proper values of those properties in BOM. Just checked - it works.

  • APDAPD Member Posts: 40 PRO
    @lorenz_michels I use this workflow too and it works well if you have a pre-defined list of configurations. Not quite as useful if you are generating the configs "on the fly" in the assembly via a config variable. This is trickier and needs funky feature scripts (as I guess is outlined above)

    I often set up a "custom" part studio (defined with "continuous" config variables) and then a second "stock" part studio with the "custom" part derived into it. This "Stock" studio is then configured with a finite list and with configured part names. 

     Wish I could use configurable assembly "part names" in the same way, but appears not for now.  Onshape, please can you make it so?? :)
  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    I think there will plenty of good things to come in armpits configurations. Oh FFS android, "assembly configurations", not 'armpit configurations".
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,475 PRO
    I'm not much of a FS coder but it only took me one night with couple of emails to support along with examples in forum to put this together and I'm really happy I gave it a shot. A real time saver until we get similar built-in functionality.

    It's only one feature in ps tree to get all parts dimension into bom.
    //rami
  • Florian_SchneiderFlorian_Schneider Member Posts: 6 PRO
    edited June 2019
    Hi There

    My question would be, how did you rename the property?

    I would like to add my own Properties to my BOM, something like "Price" or "Comment". I dont like "Title1" "Title2" and so on... 

    How can i change the titles of the properties? (i mean your columns are named X, Y and Z) How did you do that?


  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,935 PRO
    Goto your company's settings and select properties

  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    edited June 2019
    As a pro user you have access to "custom properties".

    Here are some of mine as an example:-

    I'd imagine @3dcad has made himself some custom properties, and then used a featurescript to populate them.  A custom property, whether populated by the user or via FS can then be used in the BOM just like any other native property.

    Owen S.
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,475 PRO
    Haven't notice this until now, that's exactly what I did: created custom properties x, y and z and then use fs to populate them with a single feature.
    //rami
  • JuanOZJuanOZ Member Posts: 1 ✭✭
    @3dcad Could you share the FeatureScript you wrote so we can learn how to do it, please?
  • brian_bradybrian_brady Member, Developers Posts: 505 EDU
    As a pro user you have access to "custom properties".

    Here are some of mine as an example:-

    I'd imagine @3dcad has made himself some custom properties, and then used a featurescript to populate them.  A custom property, whether populated by the user or via FS can then be used in the BOM just like any other native property.

    Owen S.
    I would love to be able to do this with an Education or Standard account. Alas, people who use those accounts have not been given a way to create custom properties. Obviously only a Pro or Enterprise user would ever want to include a supplier or mass or cost or anything else in their BOMs. <Sad trombone sound.>
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,045 ✭✭✭✭✭
    As a pro user you have access to "custom properties".

    Here are some of mine as an example:-

    I'd imagine @3dcad has made himself some custom properties, and then used a featurescript to populate them.  A custom property, whether populated by the user or via FS can then be used in the BOM just like any other native property.

    Owen S.
    I would love to be able to do this with an Education or Standard account. Alas, people who use those accounts have not been given a way to create custom properties. Obviously only a Pro or Enterprise user would ever want to include a supplier or mass or cost or anything else in their BOMs. <Sad trombone sound.>
    @brian_brady
    Is there an improvement request for these to be allowed in EDU or Standard accounts?
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,475 PRO
    @3dcad Could you share the FeatureScript you wrote so we can learn how to do it, please?
    It is already public feature, look for 'Set Properties with FeatureScript'
    //rami
Sign In or Register to comment.