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!

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

Status
Not open for further replies.

MarckyMON

Computer
Nov 30, 2010
93
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
 
Replies continue below

Recommended for you

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