Create a new column and choose "Equation" for Column Type.
Use this equation:
=IF(`Material`="Material <not specified>";"";`Material`)
This will show the material if it's specified, or blank if it's not.
If you put "SW-Material" in the custom property of a part, Solidworks will evaluate this to the name of the material embedded in the part, or "Material <not specified>" if you haven't picked one. The equation reads the evaluated custom property, and in the case that it's "Material <not specified>", it shows nothing. Otherwise it'll show the material name.
(I realise this thread's pretty old, but I found this while trying to fix the same problem, so thought I'd share my solution)
I do this in the BOM for some custom properties. However, he it seems he is dealing with an annotation and I don't know if that functionality is available in annotations.
Another work around may be to create a custom material named " ", that's right just a blank space. Then change the default template to have that as the material.
The workarounds we have to come up with...
You are correct. Its an annotation that I'm having issues with.
Granted, Sandy's solution seems very sound for BOMs that have columns that link to the Part material properties. But honestly, I think it stinks to have to create an extra column, just to work around such a trivial issue. That would mean that I need to create a new BOM template, that has this built in, when its rare that this would be needed anyway (most of our Parts do have a material applied). I think SW should automatically leave it blank, instead of "Material <not specified>", when no material has been applied to a Part. It used to be like this.
Your solution for the "Blank Space" material is a good idea to set the Part templates to. This should take care of this problem for annotations, as well as BOMs. Good workaround, moving forward.... Doesn't really help on existing stuff though.
Definitely take a look at Dan Pihlaja's suggestion about Property Tab Builder for existing parts. It will save you a lot of time.
Regarding the "new" functionality, somebody may have needed the material to show that way and they could have possibly sent in a feature request. Who knows? But, the problem is solvable.
My current process uses a combination of a lot of what is in this thread. I use the IF THEN statement in my BOM to refer to the configuration name if the Custom Property "BOM Description" is an "*". That way I can have configured parts that show in the BOM with their configuration names and also other parts with text set in the "BOM Description" field.
I also sometimes create parts that reference dimensions from the part (with the cursor in the Custom Property field double click a feature and select the dimension and it will appear in the field). That's a nice trick I learned some time back that really can make those Custom Properties work better.
Custom Properties are a real time saving way to keep all the information about your parts and assemblies together.
Use the property tab builder (edit: at the part level) and when you link your field to the material property, give it a default.
That way, the default will always be applied if no user input.
Great point! I need to remember to mention Property Tab Builder every time I mention custom properties, as John Stoltzfus says, it is one of the best but underused tools out there. It has saved me so much time that it is second nature to use it for bulk modifications of properties. But then I forget to mention it sometimes.