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
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.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: IGNORE FILES WITH NO DRAWINGS.
RE: IGNORE FILES WITH NO DRAWINGS.
Thanks for your reply.
Did the GRIP program you mentioned batch export using 2D-Exchange?
Thanks,
James
RE: IGNORE FILES WITH NO DRAWINGS.
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.
James
RE: IGNORE FILES WITH NO DRAWINGS.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: IGNORE FILES WITH NO DRAWINGS.
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