15 Replies Latest reply on Dec 18, 2017 7:56 AM by Nick Tzallas

    Sheet Format Size Property call-out

    Nick Tzallas

      I have gone ahead and created all of the A paper size Sheet formats and respective sheet templates for all A0-A4 sizes for our company.

      On the sheet format I have a call out for the sheet size $PRP:"SW-Sheet Format Size(Sheet Format Size)" and as per usual it returns the paper size (A4, A3 etc) depending on the format selected. Assuming of course you have used a standard sheet format as your base to start with.

      Screenshot 1.jpg

       

      We have a requirement for a custom elongated paper size. When creating and using the custom paper size setting to achieve it, the property call-out $PRP:"SW-Sheet Format Size(Sheet Format Size)" now returns "Custom". Fair enough, a logical placeholder value.

      Screenshot 2.jpg

       

      My question is, where can I find the SW-Sheet Format Size(Sheet Format Size) property so I can edit it and instead of it returning "Custom", have it say something like "Company extended" or whatever it maybe?

        • Re: Sheet Format Size Property call-out
          Bill Toft

          Nick,

          I don't use custom sheet sizes but your question intrigued me, so I did some experimenting and this is what you need to do:

          In your Drawing Template, add a new Custom Property called:

               SW-Sheet Format Size(Sheet Format Size)

          (All I did was copy the name from your message.)

          I then made it equal to "A++"

          This immediately showed up in the title block.

            • Re: Sheet Format Size Property call-out
              Nick Tzallas

              Bill Toft

               

              Thank you for the response and the experimenting there. It seems like a simple answer and easy enough to replicate however I am having trouble to do so.

               

              I keep inputting the SW-Sheet Format Size(Sheet Format Size) as custom property (tried both at template and format level) and adding a random value to make it show and unfortunatly nothing.

              I tried creating a new annotation and relinking it incase it needed the refresh, still nothing.

              Also tried using a standard sheet format from the SW defaults in case my custom ones where "corrupted" and still nothing I'm afraid.

              Plus the section in parnthesis dissappears after every custom property save. [goes from "SW-Sheet Format Size(Sheet Format Size)" to "SW-Sheet Format Size"]

               

              Would it be too much trouble to post your example file so I can see what's going on with my mess?

               

              I'm running SW 2016 SP3.0 (if that makes any difference)

               

              On secondary note: if folks can indeed replicate Bill Toft's solution above, please let me know and I can set it as the correct answer to this thread (despite me failings lol).

                • Re: Sheet Format Size Property call-out
                  Bill Toft

                  Nick,

                  I was using SW2018. I just tried it in SW2016 and got the same result you did. So, for SW2016:

                  1. Open your drawing template and create a new custom property "Sheet Format Size". I set value as "A+"

                  2. Edit Sheet Format and double click on "Custom"

                  3. Delete the $PRP:"SW-Sheet Format Size(Sheet Format Size)" and do Link to Property and select "Sheet Format Size"

                  4. Save new sheet format and new drawing template.

                  If you want to use this method for all sheet sizes, you will need to update this custom property and type in the correct sheet size each time.

                    • Re: Sheet Format Size Property call-out
                      Nick Tzallas

                      Bill Toft thank you for the investigating, much appreciated

                       

                      I did manage to replicate it (woo hoo!)

                       

                      So if I could have you clarify...basically , is that adding a new custom property to the property pane, or even the sutome property.txt file? you could have called the property, say, "blanketyblank" for all intensive purposes (I added a TEST suffix in the below screen shot for example) and linked it to an annotation and followed as per your instructions, right?

                       

                      The intention was to manipulate the, for lack of a better term, "built-in" existing property, not to create a custom one i.e find where that built-in SW-Sheet Format Size(Sheet Format Size) resides in the standard format/sheet size and manipulate the value/text expression.

                       

                      In a nutshell, where do the "SW-" properties sit? OR more specifically where do they sit in SW 2016

                      I do apologise for not clarifying in my original post, I though I had used the correct SW terminology there.

                       

                      It seems as though the relation to the built in SW- property has been created/mended in SW 2018 since your initial experiment in your previous post managed to auto-update the note without needing to link again (i.e. PRP rather than annotation link) despite you having to manually enter the SW- property in the "custom" pane. hhmm interesting

                       

                      I fear it might be that SW 2016 simply doesn't offer access to it and I might have to go as per Glenn Schroeder's suggestion after all. Unless there is something that I missed

                       

                      your thoughts?

                       

                      Untitled.jpg

                        • Re: Sheet Format Size Property call-out
                          Bill Toft

                          In SW2018, all I had to do was COPY SW-Sheet Format Size(Sheet Format Size) as a new custom property. Then I entered A+ as the value and it IMMEDIATELY showed up in my drawing. This was with the default sheet size (11x8.5). When I later changed the sheet size to 11x11, the drawing still showed A+. So, in effect, I was overriding the the default / programmed value that SW displays.

                           

                          In SW2016, I needed to create a new custom property, then replace the default link to SW-Sheet Format Size(Sheet Format Size) with my own custom property. So yes I could have named it anything.

                    • Re: Sheet Format Size Property call-out
                      Elmar Klammer

                      Hi Bill,

                       

                      Use the macro below to get the sheet size of the current drawing sheet.

                      Determining Sheet Size and Scale Via API

                      The code below lets you add a custom property to a drawing document.

                      All you have to do is use a "case lookup" and you can link the sheet size to your custom sheet property index like A++

                      ' ----------------------------------------------

                      ' Preconditions: Drawing document is open.

                      '

                      ' Postconditions: The custom property Input1 is added  to the  file.

                      '

                      ' NOTE: Because configurations are not supported

                      '        in  drawings, pass a blank string when the file is a drawing. 

                      '------------------------------------------------

                      Sub main()

                      Dim swApp          As    SldWorks.SldWorks

                      Dim swModel      As    SldWorks.ModelDoc2

                      Dim swDraw         As    SldWorks.DrawingDoc

                      Dim retval         As    String

                      Set swApp = Application.SldWorks

                      Set swModel = swApp.ActiveDoc

                      Set swDraw = swModel

                      retval = swModel.AddCustomInfo3("",  "Input1",   swCustomInfoNumber, "2345")

                      MsgBox retval

                      End Sub

                      ' ----------------------------------------------

                        • Re: Sheet Format Size Property call-out
                          Bill Toft

                          I am now thinking that there must be a lookup table  somewhere in the SolidWorks code. "Sheet dimensions vs Sheet Size."

                          Then if the sheet dimensions don't match one of the standard sizes, the Sheet Name is set to Custom.

                          So, is there a way to edit that lookup table? So I could add, say 11" x " 11 and give it the Sheet Name of, say SQR?

                      • Re: Sheet Format Size Property call-out
                        Glenn Schroeder

                        Nick,

                        I'm a big believer in using custom properties to drive Notes, but in this case I'm afraid I don't see why it's necessary.  Won't you need a separate sheet format for each sheet size?  So why not just type the note in manually and save the sheet format instead of linking it to a property?

                        Glenn

                          • Re: Sheet Format Size Property call-out
                            Nick Tzallas

                            Glenn Schroeder you do make a good point

                             

                            I just wanted make things all nice and neat so it just works and autpopulates without any extra steps. If I would need to create any more custom stuff in the future it would just fill itself like anything else with a link. Create new custom sheet, copy paste over all the linked annotations/title blocks etc, refresh, boom.

                             

                            You are right though a simple note is equally as easy (set and forget) and since it is solely for each format, having it driven by a property might just be overkill or my fussiness getting the best of me

                          • Re: Sheet Format Size Property call-out
                            John Stoltzfus

                            Glenn Schroeder stated the correct and easy way to handle this, the only thing I want to add is that I would have a Sheet Template and a Sheet Format, even though it's not needed, I keep them the same, plus I got into the habit of when I change my template I save out the Sheet Format right away as well..

                              • Re: Sheet Format Size Property call-out
                                Glenn Schroeder

                                John Stoltzfus wrote:

                                 

                                Glenn Schroeder stated the correct and easy way to handle this, the only thing I want to add is that I would have a Sheet Template and a Sheet Format, even though it's not needed, I keep them the same, plus I got into the habit of when I change my template I save out the Sheet Format right away as well..

                                 

                                John ,

                                 

                                With all due respect, are you sure you don't have that backwards?  When you save a drawing template it will use the sheet format as it currently exists.  When you make a change to a sheet format then you need to open all drawing templates that use that sheet format, update them to the newest version, and then save the drawing template.

                                 

                                Glenn

                              • Re: Sheet Format Size Property call-out
                                Nick Tzallas

                                Not an out-and-out answer to the question, but here is mid-way solution for what it's worth

                                 

                                I used the existing "SWFormatSize" property to call it out in the annotation.

                                 

                                It's not a total automation but it does use an existing OOTB property, so....meh

                                 

                                Not nearly a ground breaking idea, but putting here for posterity

                                 

                                Untitled.jpg