Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE 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
Joined
Jan 14, 2015
Messages
150
Location
US
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,
 
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

Back
Top