5 Replies Latest reply on Jul 27, 2018 1:53 AM by Md Sobug Mia

    Custom Property to be populated in Drawing sheet

    Md Sobug Mia

      Hi,

      I am a beginner of SolidWorks. I need help of expert and professional. I saw each of the members are very helpful here. So, I am here to get a help.

      I have a part with different custom property. I added those custom property with “Property Tab Builder”. Let us think, one of the custom properties is “Drawing Number”.

       

      Now, I want to show that custom property (“Drawing Number”) to be populated automatically in the title block of drawing sheet. For that, I have edited title block and linked the text to the custom property (“Drawing Number”) of the part. So, it works well.

       

      Now, If I do not add any Value in the “Drawing Number” custom property of that part, that time I want to show the “Configuration name” to be populated at that place.

       

      So, is there any way to do that. Is there any code can do that? Or any macro?

       

      Something like a conditional statement………………………….

       

      “if(“Drawing Number”= Value, Value, “Configuration name”)

       

      I do not know anything of coding. Sorry for showing something like code.

       

      So, what is the summery is that, whenever “Drawing Number” custom property is available for the part, then it will show that “Drawing Number” custom property in title block. If “Drawing Number” custom property is empty in part, then it will show Name of the configuration of the part.

       

      Thank you for looking on my problem.

       

       

      With best Regards

      Sobug

        • Re: Custom Property to be populated in Drawing sheet
          Glenn Schroeder

          I don't know how to set something up like that, although it's certainly possible.  If it's not possible it would be pretty easy to have two sheet formats, with the note linked to the custom property in one and to the configuration name in the other, and use whichever would be appropriate in your Drawing.

          • Re: Custom Property to be populated in Drawing sheet
            Deepak Gupta

            You need to create one more property and then use design table and excel intelligence to populate this new property with either drawing number or configuration name. And then link this property into drawing.

            • Re: Custom Property to be populated in Drawing sheet
              Dan Pihlaja

              The only way that I can think to get what you want is to have the Drawing Number field populated with $PRP:"SW-Configuration Name" by default inside the Property Tab Builder.

               

              You could do it 1 of 2 ways (as I see it):

               

              1) Create the Drawing number as a textbox and put $PRP:"SW-Configuration Name" into it as the default value.

                   Pro 1: If the user doesn't do anything with it, then the Configuration Name will be Drawing Number automatically.

                   Con 1: The Property Tab Builder interface never shows the Evaluated value....so the user will see $PRP:"SW-Configuration Name" in the text box.....which could confuse some users.

                   Con 2: Also, if the user accidentally deletes the $PRP:"SW-Configuration Name", then they would need to know the syntax to get it back.

               

              2) Have Drawing Number as a drop down menu with $PRP:"SW-Configuration Name" as one of the choices, and allow custom values to be added.

                   Pro 1: The user can't accidentally delete $PRP:"SW-Configuration Name" since it is one of the choices in the drop down menu.

                   Pro 2: Also, the user can add a custom value making it the proper drawing number.

                   Con 1: There is not a way to have a selection in the drop down menu as a default selection.....so if the user does nothing with it, it will remain blank.  They will have to choose to add a drawing number or the configuration name selection.