×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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
 

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

(OP)
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
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources