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!

NX Block Styler

Status
Not open for further replies.

srav1

Mechanical
Joined
Aug 25, 2010
Messages
7
Location
IN
Hi Everyone!!
Could anyone help me resetting the values of block styler (Type Double) to zero. I know the code for resetting
values has to be written under void Projectname::dialogShown_cb()

Basically I want to know how to use setdouble.
Please help.
 
It depends on what version of NX you are using. At NX6 and earlier the blocks have no methods to get/set values. Instead you have to use what is known as a PropertyList. So to set the value of a DoubleBlock you would have to do something like this:
Java:
nxopen.blockstyler.DoubleBlock db;
...
PropertyList pl = db.getProperties();
pl.setDouble("Value", 123.4);
pl.dispose();
But somewhere between NX6 and NX8.5 the blocks were enhanced so you can now call methods on them directly to get/set values. So at NX8.5 the above code could be written much simpler like this:
Java:
nxopen.blockstyler.DoubleBlock db;
...
db.setValue(123.4);

Hope this helps.
 
Hi grinch33 thank you!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top