5 Replies Latest reply on Jul 13, 2017 5:09 AM by Dennis Beeren

    Old vs. new style sheet metal bounding-box update

    Dennis Beeren

      Dear all,

       

      I have a macro which copies the bounding-box length and width from the cut-list properties of the sheet-metal part to its configuration specific properties. For old-style sheet-metal parts (without Sheet-Metal folder), when modifying the part, it always has been necessary to flatten (and unflatten) the part to update the bounding-box in the flat-pattern which consequently updates the cut-list properties.

       

      Although it is a time consuming action (when running the macro), it always has been a necessary part of it.

      I discovered lately that when it is a new-style sheet-metal part (with Sheet-Metal folder), the bounding-box and the related cut-list properties get updated automatically after changes to the geometry of the part have been made.

      It the latter case I do no longer need to flatten (and unflatten) the part and I could remove that code from my macro. But since that only concerns the new-style sheet-metal parts I have some question for which I hope to find some answers here:

       

      1. Is it possible to convert an old style sheet-metal part to the new-style? Since otherwise we will have different kind of sheet-metal parts till the end of days, due to reuse of models. I doubt it, but can this be done through the API?
      2. Can I detect programmatically (API) if a part is new - or old-style? One way could be to find the sheet-metal folder and if it is found you know it's new-style. But is there a cleaner way?
      3. Is there another way to update the bounding-box of an old-style sheet-metal part, than flattening and unflattening?
      4. Any additional input or fresh thoughts over this subject/issue is really appreciated!

       

      The main goal here is that when the code gets really fast, it would be an option for me to run the code on every rebuild automatically, instead of having the users to run the macro manually.

       

      Best regards to all,

      Dennis.