×
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

desperate attribute help needed

desperate attribute help needed

desperate attribute help needed

(OP)
I am trying to vrite a VB/NXopen script to see if an attribute exitsts
in a part.  If that attribute exists, I want to add other attributes
to the part, if it doesn't I want to do nothing to it.

is there a command like isStringattribute("string")?

I am using NX3 and NX5

RE: desperate attribute help needed

I'll take a stab at it, but bear in mind that I am stuck on NX2 right now so my suggestion is untested.

Failing to find anything specific in the help files, my first inclination would be to try to assign the value of the attribute in question to a variable. If you try to access an attribute that doesn't exist I would expect some sort of error to be thrown. You should be able to catch it with an 'on error' or 'try' 'catch' clause. If there is no error, continue adding new attributes; if an error is thrown, exit the sub/function.

RE: desperate attribute help needed

(OP)
Thanks Cowski.  I'll try that.  I'm not exactly a  programmer, but I'll try to wing it. I'll post back with results
 

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