×
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

Wrapper methods for UF in "uf_attr.h"

Wrapper methods for UF in "uf_attr.h"

Wrapper methods for UF in "uf_attr.h"

(OP)
Hi -

I'm doing some NXOpen API programming VB and often use some of the "Wrapper methods" for NXOpen.UF

But in the file: uf_attr.h it seems that there are some (many) calls that is not possible to use as VB, because there is no wrapper method.
---
ex. Not working:
UF_ATTR_ask_part_attrs_in_file > cant find wrapper method
UF_ATTR_read_value > cant find wrapper method
UF_ATTR_ask_part_attrs > cant find wrapper method

---
ex. Working:
UF_ATTR_ask_part_attribute > ufs.Attr.AskPartAttribute()
UF_ATTR_find_attribute > ufs.Attr.FindAttribute()

My question is :

Will it be possible to use all the calls from the uf_attr.h in a VB program - and if so - how do I do this?

lklo

RE: Wrapper methods for UF in "uf_attr.h"

The NXOpen API does not fully cover the C/C++ API. Some of the functions you mention have a note "Discouraged in new applications"; these were probably intentionally left out of the NXOpen API. Two of the examples you gave have NXOpen equivalents (no wrapper function needed):
UF_ATTR_ask_part_attrs > {part reference}.GetUserAttributes(...)
UF_ATTR_read_value > {part/object ref}.GetStringUserAttribute | .GetNumberUserAttribute | .GetTimeUserAttribute | etc etc

The UF_ATTR_ask_part_attrs_in_file function looks interesting and a quick scan of the NXOpen docs found no equivalent. Sometimes wrapper functions are not added to the NXOpen API because the data returned by the C/C++ function is not easily converted to the managed .net environment (such is the case with some of the UF_BREP functions). Though I'm not sure this is the case for UF_ATTR_ask_part_attrs_in_file. A call to GTAC would probably be required for a definitive answer.

www.nxjournaling.com

RE: Wrapper methods for UF in "uf_attr.h"

I already did that for UF_ATTR_ask_part_attrs_in_file. PR's open, an NXOpen replacement is planned, but not implemented yet. Additional info on these UF_ATTR changes can be found in SFB-NX-6866 and SFB-NX-6874.

RE: Wrapper methods for UF in "uf_attr.h"

(OP)
Hi

Thank you for your answer. I do know that some of the examples doesnt need a wrapper, I know the ****.GetUserAttributes() very well.
But in my current programming project, I'm doing some test to read attributes from NX files placed into a windows file folder(7000+ nx part files as assembly).
My intention was, if it was possible to do this without opening each file, but I dont thing it is possible.
What I have made until now is also working very well.
I have put all files into an array ,aftewards I open each file quite ,and make it workpart quitely temporary, also without making it display.
In this manner it possible to read the partattributes im each file very fast - without have any parts displayed , (only No Part in the NX window)
Another important thing is - when higspeed reading is nesseary - is to set the "SetUpdateLock(True)" from within the Class updatemaneger.

lklo

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