I am looking to create a custom property on my parts to use on my drawings. Some of my parts have configurations and some don’t. If they do not have configurations, “default” is the standard name, otherwise it is renamed accordingly.
My issue is I cannot get an if statement in a custom property to say: if $PRPSHEET:“configuration name”=“default” then " ", else $PRPSHEET:“configuration name”.
Can someone show me how to do this? All of my attempts at this have failed miserably. I would like to add this to my part template file for all future parts as well as for my current project files.
SolidWorks’ built‐in custom property linking doesn’t support conditional logic. The property link fields are strictly token‐based: they simply pull in the values from the file’s or configuration’s properties without parsing any “if” or other logical functions.
I believe you would need to use a macro in order to do what you are asking.
Well, that’s a bummer…
1 Like
A macro feature is good for this kind of thing. They can execute code on every rebuild. See
for an example of what a macro to create a macro feature looks like.
1 Like