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 cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue with SetStrings for a Multi-Line String in BlockStyler NX7.5 x64

Status
Not open for further replies.

MarckyMON

Computer
Joined
Nov 30, 2010
Messages
93
Location
DE
Hello all,

I am having a real headache trying to figure out this problem, maybe you can help me??

I am trying to set strings for a multi-line string block, in Blockstyler, NX7.5 64bit. My code snippet is as follows:

Code:
std::vector<NXOpen::NXString> strArray;
strArray.push_back("Test");
strArray.push_back("me");
<block_id>->SetStrings("Value", strArray);

Where <block_id> is the variable name of my multi-line string block.

The above code runs fine and there is no complaint from NX (as far as I can tell from the syslog), but under no circumstances are the strings shown in the block!

My guess is that I am using VS2008 and there is a possible issue with the std containers. Would that be a safe assumption? Or am I missing something here??

Much help would be appreciated, thank you!!

Marc
NX Software Developer
 
Problem solved!

The following preprocessor definitions had to be set for the affected project:

Code:
_CRT_SECURE_NO_DEPRECATE
_SECURE_SCL=0
_HAS_ITERATOR_DEBUGGING=0

You only need to set these if you need to pass std containers to an NXOpen C++ function, as the NXOpen C++ libs were all compiled with _SECURE_SCL=1 (default!)

Marc
NX Software Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top