I am trying to write an equation inside of a BOM so that it can drive what populates the field inside the column.
Is it possible to have multiple "=" values inside of a Solidworks native BOM file. From what I can gather it is possible inside of an Excel based BOM using VB and other methods. What I want is to make it work inside of a SolidWorks based BOM.
Here is an example of how I am trying to write my equation pasted below.
IF(`CUSTOM PROPERTY`="VALUE1";"TITLE";(IF(`CUSTOM PROPERTY`="VALUE2";"";IF(`CUSTOM PROPERTY`="VALUE3";"";`SW-File Name(File Name)`))))
The problem is that one of my statements overrides the others.
Is my formatting wrong or is it just not possible to have multiple equal values inside a Solidworks BOM?
If I understand your question, yes, you can have multiple equal values in a BOM equation. I think you mean what programmers call "nested IF statements".
Last I checked, the knowledge base says that nested IF statements in the BOM are broken. It doesn't clarify that they are only broken if the nested statement is in the TRUE argument. You can still nest them in the FALSE argument. This has been broken since 2005, I think. I haven't checked to see if it's still broken in 2009. I don't get to use anything newer that might have ancient bugs fixed. The knowledge base states that it is possible in 2010 (S-049596).
So, you can do:
IF(test;TRUE;IF(test;TRUE;FALSE))
But you can't do:
IF(test;IF(test;TRUE;FALSE);FALSE)
That's the first thing I know you may have to fight, but I don't see you nesting IF statements in the TRUE arguments in your example. Your example looks like it should work. Or, this may have been fixed. I don't have time to test. Please report back if it is fixed.
Another thing I used to bang my head on is concatenating values. If you have custom properties:
Property1=foo
Property2=bar
You can't just have
'Property1' ' Property2'
and expect the BOM equation to run them together to get "foobar". (Never mind that this works when you do $PRP:"Property1"$PRP:"Property2" within a custom property in a model file.) Instead you have to have a text string buffer between the property or column names. These work:
'Property1' "" 'Property2' --> foobar
'Property1' " " 'Property2 --> foo bar
As far as I know, this is still undocumented.
Apart from those, you may have some wierdness with properties not appearing to be present because the assembly is waiting on a rebuild. Or, the particular configuration a configuration specific property resides in is not referenced in the assembly. Things like that can make nested IF statements act funny too.
Hopefully all that shakes something out for you. At least you know that it should be working.