1 Reply Latest reply on Nov 27, 2015 6:51 PM by Amen Allah Jlili

    Macro to Change Properties of Part in Drawing View

    Tony Thompson

      Hello

       

      We are using the Custom Property Tab Builder to create templates for adding custom properties to our part and assembly files that populate all of the title block and BOM information in our drawings that is working very well and the only custom property we have in the drawing is the Revision property so it will work with the Revision Table when entered. There are two things I would like to accomplish with a Macro.

       

      1st we have a custom property in the part and assembly files called Shop Order that will change if the part is reordered at a later time and I would like to be able to open the drawing only and change the Shop Order custom property in the part or assembly file that is in the drawing view (which is the same name as the drawing) that we have a link in the title block to this property.

       

      2nd I would like to have a Revision custom property in the part file that the macro would fill in based on the Revision custom property in the drawing.

       

      Also on a slightly different note it would be great to somehow keep a list of all of the Shop Order numbers used for the parts but is just a wish list if this would be possible to do.

       

      We are using SolidWorks 2015 sp4 and we do not have an EPDM but it is on our wish list so we are trying to setup our system so that our part, assembly and drawings already have the custom properties in them to be able to populate the EPDM if or when we move to it.

       

      Thanks

      Tony

        • Re: Macro to Change Properties of Part in Drawing View
          Amen Allah Jlili

          Only and If only I understood you correctly, this would solve your question:


          You actually don't need a macro to achieve 1st and 2nd. If what you want to achieve is changing the custom properties (shop order and revision in your case) of a part or an assembly from a drawing file, simply do the following (Assumingly, your part/assembly have the custom props already):

           

          - Insert a BOM in the drawing sheet.

          - Add the columns of the shop order and the revision to the BOM.

          - Change cell values of shop order and revision. The properties will automatically change inside the part or assembly (As illustrated in the image below)
          - Check the assembly or part properties and you'll see that the props have changed.

          - Save the BOM template for later use.

           

          preview.png


          Based on this method, a macro that takes the order and revision values off this BOM and saves them a database (Access for instance) would be a great to track the order numbers!