Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ug_askExpressionValue_

Status
Not open for further replies.

EngProgrammer

Aerospace
Jan 14, 2015
150
Dear Forum.

I am trying to use ug_askExpressionValue_ to grab an expression within UG and cascade it down into a knowledge fusion class. I am using the following syntax ug_askExpressionValue_( ug_askCurrentWorkPart(), iNumberSlots ). Within the Knowledge Fusion Navigator it is return "NoValue" eventhough there is a value set within tools expression for this expression.

Any suggestions what I might be doing wrong??

Regards,
 
Replies continue below

Recommended for you

EngProgrammer --

Two things...

1. The second argument for this function is a "String" datatype. As such, you'll need to have quotes around the string. (Without the quotes, KF interprets this as a "Name" datatype, which is incorrect for this function.

So, with that tweak, this syntax should work for you:

Code:
ug_askExpressionValue_( ug_askCurrentWorkPart(), "iNumberSlots" )

2. For the first argument, what you've done will work fine. But just so you know, an empty set of double-quotes gives the same effect here, as the function will assume the current work part unless otherwise specified. So, the syntax below should have the exact same behavior for you, but be just a touch shorter:

Code:
ug_askExpressionValue_( "", "iNumberSlots" )

Does that help?

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor