4 Replies Latest reply on Jan 1, 2017 9:12 PM by Nilesh Patel

    Macro: Create BOM without QTY/"Configuration name" in column

    Cad Admin

      Is there a way to NOT have the "QTY/"Configuration name" populate a BOM column, created via the API.  the only time i don't get it is if the BOM is "manually" created or there is only one config.

       

      I'm currenly using InsertBomTable4

        • Re: Macro: Create BOM without QTY/"Configuration name" in column
          Nilesh Patel

          Hi,

          I guess you just want to display "QTY" instead of "QTY/Configuration name" in the quantity column of BOM table.

           

          You mentioned that "the only time i don't get it is if the BOM is "manually" created". When I insert the BOM table manually for an assembly which has more than one configuration, I still get "QTY/Configuration name". Only time I don't get this if the assembly has only one configuration or Restrict top-level only BOMs to one configuration check box is checked as per the image below in the drawing document.

           

          if Restrict top-level only BOMs to one configuration is checked and you insert BOM using IView.InsertBomTable4 method, you will get only 'QTY' displayed in the quantity column. You can specify empty string for configuration and BOM will be created for the active configuration in the drawing view.

           

          If you do not want to check Restrict top-level only BOMs to one configuration then you can try following steps to change "QTY/Configuration name" to "QTY".

           

               Set swTableAnn = swBOMTable      (where swTableAnn is ITableAnnotation and swBOMTable is IBomTableAnnotation returned by IView.InsertBomTable4 method)

              swTableAnn.Text(0, 3) = "QTY"      (Column 4 will be quantity column if you are using standard BOM table or you can loop through first row to find quantity column).

           

          Hope this helps.

           

          Regards,

          • Re: Macro: Create BOM without QTY/"Configuration name" in column
            Cad Admin

            Is there a way to change the document option within a macro.  If i add it to my macro, it should fix my problem prior to "creating" the BOM.