Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SolidWorks API - Pulling Evaulated Custom Property values

567 views
Skip to first unread message

d.ortiz

unread,
Sep 21, 2005, 4:10:22 PM9/21/05
to
Does anyone know how to get the evaluated value from a custom property
to show in a text box instead of the linked solidworks' dimension path
after an engineer links the dimension to the property (a practice a
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 the
model, he will then see the solidworks pathway to that dimension in
the user form text box, when, it would be much more useful to show
him what the value is (instead of the pathway)... like 6" for
example.

I have a single picture that shows the solidworks properties interface
and my userform and the problem I'm talking about. Link below.

http://home.comcast.net/~jacklapham/LinkedPropsEval.JPG

Something interesting to me, is, when this data is eventually written
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.

That70sTick

unread,
Sep 21, 2005, 5:18:43 PM9/21/05
to
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.

d.ortiz

unread,
Sep 21, 2005, 8:10:11 PM9/21/05
to
If anyone cares to know...

cPartQtyEval = Part.GetCustomInfoValue(Config.Name,
"Length_Area_Assy") 'Grabs evaluated value
' Where...
' Part = Active SolidWorks Document
' Config.Name = Active configuration
' Length_Area_Assy = Custom Property field of interest

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

Tony

unread,
Sep 21, 2005, 9:11:41 PM9/21/05
to
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

"d.ortiz" <lap...@onid.orst-dot-edu.no-spam.invalid> wrote in message
news:9KednUbdd_T...@giganews.com...

That70sTick

unread,
Sep 22, 2005, 8:58:00 AM9/22/05
to
What call were you using before?

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

0 new messages