19 Replies Latest reply on Jan 4, 2016 1:23 PM by Eric Blankinship

    Linking Custom Properties from Assemblies to Drawings

    Eric Blankinship

      Hello,

       

      I am currently working on setting up way for my companies title blocks to automatically populate certain information from 3D.  Essentially the way I have it setup is that the custom properties are filled out in each individual component and then when inserted into a new drawing that information is transferred using formulas in the drawing custom title block such as $PRPSHEET:"Part Number".  This works great when making part drawings as people can make as many drawings as they need for mfg or for customers using the same components and title blocks are filled out with the pertinent data.  The issue I am having now is I want this same system to work for assembly drawings.  Now for some of the properties I can use this same system and it works just fine.

       

      The problem is that our title block is setup to list out all sub-components instead of using a BOM.  So I want to be able to setup the drawing to be able to reference the assembly so I could have $PRPSHEET:"Part Number 1", $PRPSHEET:"Part Number 2"  and so on and they would correspond directly to the assembly.  This would work well but it would mean that people would have to fill in the assembly properties directly.  What I am wanting is to be able to use the part custom properties to fill in the assembly custom properties in the order that the components are inserted into the assembly.  So that custom Property of the first component would populate Part Number 1 while 2nd inserted component would populate Part Number 2. What I am wondering is if anyone has been able to do this and what syntax I would have to do to make this work.

       

      As a secondary question if I use multiple of the same component is there a way to make it so that it only inserts the data for the part once?  Does inserting vs patterning/mirroring make a difference?

       

      Any help would be greatly appreciated.

       

      Thank you,

        • Re: Linking Custom Properties from Assemblies to Drawings
          Bjorn Hulman

          Hi Eric,

           

          having a little trouble following. So your assembly is identified by the part numbers of its parts? Why are you trying to replicate the function of the BOM while not actually using one?

           

          Do your assemblies always have the same number of parts?

          • Re: Linking Custom Properties from Assemblies to Drawings
            Adrian Velazquez

            Hi Eric,

             

            The only "easy" way to achieve this would be with a Macro, but honestly I would recommend you start discussing using this approach as as a company standard... it is an inefficient approach...

             

            If changing is not an option, what you could do as a workaround would be to just to embed a BOM table inside your title block...

            • Re: Linking Custom Properties from Assemblies to Drawings
              Timothy Taby

              You can do exactly what you want in the BOM.  Just add the BOM table to you title block template (I prefer just to insert each time since I don't always use it on all assembly drawings).  You can customize the BOM table to have only the part custom properties you want in it as well, you don't have to just use the default part file name, ect. 

               

              Sort of using the BOM functionality, the only way to do what you want is via a macro like Adrian said.

                • Re: Linking Custom Properties from Assemblies to Drawings
                  Eric Blankinship

                  Hi Timothy,

                   

                  There is a way I know I could do it manually but it would be tedious because I'd have to change information in my assembly custom properties.  I could use the syntax of Part Name 2 in the Property Name Column and then in the Value/Text Expression would have to update the information so I could use "Part Name@Part 2.SLDPRT"  The problem of course being if the file is not named Part 2 it would not work so I'd have to update the assembly custom properties to always reflect the actual part name and not Part 2.  Then on the drawing side of things I'd just use the $PRPSHEET:"Part Name 2"  and it would populate correctly.  My goal would be to have the Part 2.SLDPRT instead be something along the lines of "File name of 2nd inserted part in the tree".  If this is not possible I guess I could make it work manually.  Our IT group doesn't want me to screw around with macros & the information in our title blocks that I want to insert do not directly reflect the BOM columns after looking at the BOM more closely.  Sorry to be such a pain but just trying to make a system work with the limited freedom I've been given.  If it's not possible I'll just have to instruct the engineering group to manually type in the part file to link in the expressions values table.

                    • Re: Linking Custom Properties from Assemblies to Drawings
                      Timothy Taby

                      You can customize the BOM to have whatever part custom properties you want it to have, you don't have to have the part file name, qty, and description like in the standard BOM.

                       

                      Do the following.....

                       

                      1) Create a custom property in one of the part in your assembly called dwgnumber

                      2) Start a drawing and place a view of your assembly in the drawing

                      3) Insert a BOM (under Insert, Tables, Bom)  Pick the standard BOM table

                      4) add a new column to the table and select (right click on the table and insert, add column right or left)

                      5) select the custom property dwgnmuber from the drop down box

                       

                      That's all you have to do to get what you want, much easier then making a macro.  If you add the dwgnumber custom property to your part & assembly templates then it's always there for you to use.

                       

                      We have multiple part temples for different material parts, some for plastics, one for aluminum, one for steel, they all have the same custom properties set up the same so that we can get the drawing number to appear on BOM like in the pic I posted below.

                       

                      BOM&TB.png

                  • Re: Linking Custom Properties from Assemblies to Drawings
                    Eric Blankinship

                    I think I may have been a little unclear as to what my original issue was.  Essentially I just want a script in my assembly custom properties that reads the custom property of my part files inside the assembly

                     

                    i.e.   Part Name 1 references custom Property of first component inside assembly

                            Part Name 2 references custom Property of second component inside assembly

                            and so on and so forth.

                     

                    I did check with management and unfortunately usage of BOM or Macros is out of question.  I do have my drawings already set up perfectly as if I manually input the data in the assembly it will populate the title block correctly. I just want to only have to input data in my parts which transfers into assemblies so no manual insertion.  The reason for this desire is due to issues we have with people filling out title blocks differently between Part Drawings & Assembly drawings.  Having this system in place would make it so that there would be no chance for discrepancy between files as long as people use the system.

                     

                    Added Picture Below explaining what it is I am trying to accomplish as well as my setup so far.

                     

                    Part-Assembly-Drawing Setup.png

                      • Re: Linking Custom Properties from Assemblies to Drawings
                        Adrian Velazquez

                        " Essentially I just want a script in my assembly ..."

                             "I did check with management and unfortunately usage of BOM or Macros is out of question."

                         

                        A Script and a Macro are the same thing in SW you know..

                         

                         

                         

                        "I just want to only have to input data in my parts which transfers into assemblies so no manual insertion."

                         

                        This is EXACTLY what BOM Tables do, and what they where created for, I'd advice you contact your VAR.

                          • Re: Linking Custom Properties from Assemblies to Drawings
                            Eric Blankinship

                            Ok so the script line in the customer properties is actually a macro?  I was assuming that I was going to have to run an external document to populate the information when you guys were mentioning macros.  Sorry I am not the most familiar with using macros and only know a limited about that can be done with equations in Solidworks but I have usually used those for generating multiple versions of the same part via saved configurations and relations within a file.

                             

                            If there is a macro line of code I can put in the assembly custom property table without having to use a separate document to generate it then that would be great.  Does anyone know the code I would have to use to recognize the Property Name in the Part File and then Recognize the order it was inserted into the assembly to put into the Assembly Value Text Expression Column?

                             

                            Also if it can't be inside the property table but imbeded inside my .ASMDOT file and then have the resultant linked back to the line inside the property table that would work to.  I just need it to all stay within the .ASMDOT file and not have engineering to have to run any extraneous program to generate the data.

                             

                            As far as the second piece of advice you gave about contacting my VAR?  I am not sure what a VAR is.

                          • Re: Linking Custom Properties from Assemblies to Drawings
                            Timothy Taby

                            Answer this question....why do you want the part numbers in the assembly custom properties?  What do you do with them once they are in the custom properties list?

                              • Re: Linking Custom Properties from Assemblies to Drawings
                                Eric Blankinship

                                2 Purposes.  1 Information that can be searched.  2 Fill out Title Block on drawings.

                                 

                                The Reason why we cannot use BOM is two reasons.  First being the fact that BOM Tables are on the Sheet rather than the Sheet Format.  This makes it so that the table wouldn't be part of our drawing template and instead based upon engineers dragging it into the right location.  This makes it so that visually the drawings are not all exactly the same as positioning it exactly the same is impossible.  Second issue is that often after starting drawings engineers realize that the drawing they started with is not going to fit and they need to switch to a larger sheet format.  By having the same custom properties across all sheet formats means that the correct cells in the table are always filled in and at the exact location they are meant to be.  While the BOM table is switched when changing out the .sldprt in the background it forces the engineers to drag it back into the same location which means it may not be exact.  I know this sounds like a minor complaint but if BOM could be inside the .DRWDOT file and have it's position fixed we could use it but as you can't add a BOM unless there is a reference file and you can't save a drawing format if it references an external file this doesn't work for us.