I used NX 10 in my work and write a module .dll on Open C++.
I tried to retrieve information about added mill tool in cam setup.
Write a simple code:
NXOpen::Part * workPart(theSession->Parts()->Work()); NXOpen::CAM::Tool * tool1(dynamic_cast<NXOpen::CAM::Tool *>(workPart->CAMSetup()->CAMGroupCollection()->Fin
dObject(obj_name))); unsigned int start_time = clock(); NXOpen::CAM::ToolBuilder * toolBuilder1(workPart->CAMSetup->CAMGroupCollectio n()->CreateMillToolBuilder(tool1)); unsigned int end_time = clock(); unsigned int run_time = end_time - start_time;
Then time to execute this code about 300-400 msec per one tool, it is so long relative to other function.
Solved! Go to Solution.
It *could* be the time it takes to create the preview.
If I understand correctly, when you create/edit a tool, NX creates a "temporary" part in the background, models up the tool, and displays that model.
All of which takes a fair amount of time.
There is a customer default (Manufacturing -> Tools -> "Display" tab -> "preview" block) you could try turning off.
I don't see a preference for this (although I may have missed it).
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled
How are you running this? If it is without the UI, the preview and dynamic tool axis should not have any effect.
When I open a tool dialog, 300 msec seems reasonable. What time are you expecting, and why? Creating a builder is similar to a dialog - it takes a little time, depending on tracking points, library reference, and other factors.
What are trying to do, just extract tool parameters?