×
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

IGNORE FILES WITH NO DRAWINGS.

IGNORE FILES WITH NO DRAWINGS.

IGNORE FILES WITH NO DRAWINGS.

(OP)
Hello
A friend wrote for me, in C++ I think. a program which batch exports drawings to DWG using 2D Exchange. It works well he did a job the only issue we have is he can't get it to ignore files which have no drawings. Like for instance purchased items. Does anyone have any suggestions how he can do this in his program or...is this a setting which can be made in UG itself in settings or in a .def file?

NX6

Thanks,
James

RE: IGNORE FILES WITH NO DRAWINGS.

He can look for drawing sheet names and if the list is blank, there are no drawings. This was possible in GRIP, so I am guessing UG/Open API has the code to do it as well.
 

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: IGNORE FILES WITH NO DRAWINGS.

Are you using teamcenter? If so, would you mind uploading the program your friend wrote? I've been trying to do something similar for a while now, but the lack of programming skills really hurts me.  

RE: IGNORE FILES WITH NO DRAWINGS.

(OP)
looslib,
Thanks for your reply.
Did the GRIP program you mentioned batch export using 2D-Exchange?

Thanks,
James

RE: IGNORE FILES WITH NO DRAWINGS.

thread561-264567: NX5 - AUTOMATE PDF EXPORT?

In the thread listed above there is a journal for exporting pdf files, it looks for drawings in the file and only exports pdf's if there is a drawing. Perhaps you can use the same strategy.

RE: IGNORE FILES WITH NO DRAWINGS.

(OP)
Thanks cowski, we'll look into it.

James

RE: IGNORE FILES WITH NO DRAWINGS.

No, my GRIP program was for doing drawing formats, but it could also search for all drawings in the file aned dispaly a list of the drawing names.
 

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: IGNORE FILES WITH NO DRAWINGS.

Hi,

There is a method in UGOPEN to determine the number of drawings in the current work part, UF_DRAW_ask_num_drawings; I am not sure if there is something similar in the NXOpen API. If this returns 0, then there are no drawings in the part and therefore can be ignored.

If you need to determine the number of drawings in any part, a call to the UGOpen function UF_OBJ_cycle_objs_in_part with type UF_drawing_type is required. Again, as I don't use NXOpen that much, I cannot say for sure if there is a similar function.

HTH!

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