5 Replies Latest reply on Jan 29, 2015 7:29 PM by Daen Hendrickson

    Adding data to sheet format across all pages

    David Boydston

      Hi,

      I'm working on a few projects that span out at least a couple of pages in Solidworks drawings.

      I wanted to know if there is a way to make all sheets have the same data under "sheet format",

       

      Let me explain a little further (I already know how to create templates and stuff).

       

      My template has the following "Blank spaces"

       

      Item ID:

      Description:

      ECO Number:

      ECO Date:

       

       

      Obviously those are left blank in the format because they change with each project. However I want to know if there is a way to fill that information on page 1 and have the information get copied into page 2, 3 etc. . .

       

      its a little annoying having to type

      Item ID: 19-0115 (center it)

      ECO Number: 9001 (and center ir so it doesnt leave its designated space)

      ECO Date: 11/24/2014 (and center it so it doesnt leave its designated space)

      multiple times across each page. Specially on some assembly projects that have 10+ pages.

       

      Thank you!

        • Re: Adding data to sheet format across all pages
          Daen Hendrickson

          David,

           

          In a word - Absolutely!

           

          Your sheet format should include fixed text - such as your Item ID: - and notes linked to custom properties that will automatically fill in. My templates are such that when I click "Make drawing from Part/Assembly" the new drawing opens with predefined views already populated and the title block mostly filled out. To fill out the remaining data I update the custom properties. I never go into my sheet format.

           

          The linked notes in your title block can come from either the drawing custom properties or the custom properties of the part / assembly shown in your drawing.

           

          Hope this helps.

           

          Daen

           

          sheet format.jpg

           

          props.jpg

          • Re: Adding data to sheet format across all pages
            David Boydston

            Hi, thank you for the reply, didnt read it until now. Do you have a list of commands, I cant seem to find the references for them?

            I see you use $PRPSHEET:{NUMBER}.

            what other properties can I use?

            I know you can set the properties for each file, I would love to know how to read each one?

            Also other things like Vendor information and stuff?

            propeties.PNG

              • Re: Adding data to sheet format across all pages
                Daen Hendrickson

                David,

                 

                To link to properties - custom or SolidWorks file props - from either the drawing or the part/assembly / or a part/assembly in a specific view you create notes with a link imbedded.

                 

                Link Property.jpg

                 

                As this image shows, create a note and click the "Link to Property" icon in the property manager. This opens the "Link to Property" dialog. You select where you want the property to come from by selecting either "Current Document" (the drawing), "Model..." (the part/assembly), or "Components to which annotation is attached" (this requires the note leader to actually be attached to a component in a view. You can hide the leader after attaching).

                 

                Depending on your selection above, the drop down list of choices will vary. The drop down in the picture is showing custom and SolidWorks properties from the part file. Select what you want and the link is inserted into the note. You can have more than one property and place your own text in between.

                 

                Once the link is established the link code will be replaced with the actual text of the property if available (as shown below). Changing the property value will update the note accordingly. If you want to actually edit the link syntax, you can RMC on the note and select "Edit Text in Window".

                 

                RMC Edit Text.jpgEditText.jpg

                 

                After you have worked with them a bit you will become more familiar with the syntax and be able to manually type in your own links. Note that the capitalization is necessary.

                 

                $PRP:"your_property_name" links to properties in the current document.

                $PRPSHEET:"your_property_name" links to properties in the model document.

                $PRPMODEL:"your_property_name" links to properties in the component the note is attached to.

                $PRPWLD:"your_property_name" links to cut list properties (these can be a little flaky at times).

                 

                Your note formatting will control the text formating. Use Left / Center / Right alignment and locate the note precisely with the X/Y parameters in the note property manager. This will make sure all your notes are uniformly positioned with respect to your title block borders.

                 

                It takes a little setup, but once done it is well worth the effort. I create a model, click the shortcut to "Make Drawing from Part/Assembly" and my views and most title block data are already filled out. If SW had a non-custom macro way to populate drawing properties with data from the part I would be 90% done before I started.

                 

                For the items you do need to fill in, take a look at the custom property tab in the task pane. Instead of manually typing, this allows for quick drop-down list selection. Saves typing, creates consistency, lots of other benefits. Search Custom Properties in the Task Pane in help.

                 

                Daen

              • Re: Adding data to sheet format across all pages
                David Boydston

                Thank you very much! its been very useful.

                I have a new question about this now, is there a way to add IF statements on these fields?

                for example, some of our parts are specially customized for customers, therefore we use our own part numbers and the customers part numbers, this is not always something, so I was wondering if there is some way of saying

                IF {Customer part number exist } Then {insert part number} else { insert N/A}

                Obviously this would be used in many other things.

                 

                or something like that.

                 

                Again, thank you for the small tutorial, it's been really helpful to organize my new drawings!

                • Re: Adding data to sheet format across all pages
                  Daen Hendrickson

                  David,

                   

                  You could do something like that with a little "unsupported" work in your Part / Assembly files.

                   

                  You would need a custom property for your internal part number, a custom property for your customer part number, and a custom property for the part number to be used by the drawing title block.

                   

                  You would point your drawing title block to the part's third custom property (Drawing_Number in my example below).

                   

                  You would create a formula (the "unsupported" part) in your equation manager that would copy the internal part number into the drawing part number property unless the customer part number property was not blank. In that case copy the customer part number into the drawing part number. See this post about the general technique:

                   

                  https://forum.solidworks.com/message/459319#459319

                   

                  I created the following three custom properties:

                   

                  Part_Number

                  (Note: I tried to get this to work using the custom property name "Number". That must be a reserved name because the VBA always failed)

                  Customer_Number

                  Drawing_Number

                   

                  I created the following formula in the equation manager:

                   

                  VBADummy1 = =Part.Extension.CustomPropertyManager("").Set("Drawing_"&"Number",if(Part.Extension.CustomPropertyManager("").Get("Customer_"&"Number") like "",Part.Extension.CustomPropertyManager("").Get("Part_"&"Number"),Part.Extension.CustomPropertyManager("").Get("Customer_"&"Number")))

                   

                  As described in the other post, be sure to FIRST create VBADummy1 and set it equal to a number, and close the equation manager. Then reopen the equation manager, substitute the above in place of the number, and ignore the error message and close the equation manager.

                   

                  This if() equation says that if Customer_Number is "like" a blank (i.e. empty) get the value of Part_Number and put it in Drawing_Number. Otherwise, if Customer_Number is NOT blank put it in Drawing_Number instead.

                   

                  This will execute after each rebuild.

                   

                  Since this is UNSUPPORTED by SolidWorks, be prepared that it could break at the next update. The next step up would be a macro to perform the same functionality.

                   

                  Good Luck,

                   

                  Daen