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!

IGNORE FILES WITH NO DRAWINGS.

Status
Not open for further replies.

jkcone

Automotive
Mar 31, 2009
162
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
 
Replies continue below

Recommended for you

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
 
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.
 
looslib,
Thanks for your reply.
Did the GRIP program you mentioned batch export using 2D-Exchange?

Thanks,
James
 
thread561-264567

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.
 
Thanks cowski, we'll look into it.

James
 
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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor