SolidWorks API - Pulling Evaulated Custom Property values

Does anyone know how to get the evaluated value from a custom propert to show in a text box instead of the linked solidworks' dimension pat after an engineer links the dimension to the property (a practice lot of us are doing at my work)

I have a field in a userform that shows the length of a part, but

when my user links that custom property to an actual dimension in th model, he will then see the solidworks pathway to that dimension i the user form text box, when, it would be much more useful to sho him what the value is (instead of the pathway)... like 6" fo example

I have a single picture that shows the solidworks properties interfac

and my userform and the problem I'm talking about. Link below

formatting link

Something interesting to me, is, when this data is eventually writte

to a BOM on a drawing, it pulls the evaluated property (6"), which more or less tells me it's storing that value somewhere

Thanks -d

Reply to
d.ortiz
Loading thread data ...

Typically, API returns the evaluated property, not the formula. In the past, I have tried in vain to do the opposite (extract the formula, not the evaluated value). I'm actually a bit surprised to see what you are showing.

Reply to
That70sTick

If anyone cares to know..

cPartQtyEval = Part.GetCustomInfoValue(Config.Name

"Length_Area_Assy") 'Grabs evaluated valu ' Where.. ' Part = Active SolidWorks Documen ' Config.Name = Active configuratio ' Length_Area_Assy = Custom Property field of interes

Pretty clean and simple. I was just using the wrong call

Reply to
d.ortiz

The opposite also is worth mentioning. If you have a program that performs calculations and need to show the resultant values on a drawing, it is very easy to programmatically set the custom property value and link that propety to text in a note.

Tony

Reply to
Tony

What call were you using before?

As I mentioned earlier, I have unsuccessfully tried in the past to get the unevaluated value.

Reply to
That70sTick

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.