NEWS/UPDATES     LOGIN     SITE MAP

Your success; there is no compromise.
September 6, 2010          
BLOG  

Archive for August, 2008

Use Wrap Assembly in NX to Improve Performance

Thursday, August 28th, 2008

An effective way to improve the performance of an assembly is to simplify its geometry. However, manual simplification such as suppressing cosmetic fillets and other non-critical features can be very time consuming. Fortunately, the Wrap Assembly command in NX can automatically simplify an assembly by creating a “shrink-wrapped body” that does not contain any concave regions.

The Wrap Assembly function is very useful when you require fast performance and a fairly simplified version of your model is suitable for the application. For example, imagine that you were designing some tooling for a tire rim. You might only need to see an “envelope” (i.e. simplified version) of the tire rim in order to create the tooling around it. In this case you could use a simplified “shrink-wrapped” version that contains the basic geometry and performs faster than the original model. Below there is a picture that shows an example of this functionality. In it the transparent cylindrical body is the “shrink-wrapped” simple version, and the yellow body is the original tire rim.

At CADmech we have used the Wrap Assembly command to simplify several large and complex assemblies in NX and to improve their performance as well. We also managed to export “shrink-wrapped” models from NX into different CAD systems that did not have this functionality. Please contact us if you have any questions on the Wrap Assembly command or any other features that interest you.

- by Misha Bosnjakovic

Automate Repetitive Tasks

Friday, August 1st, 2008

 

Imagine that you are working on a rather long design project. When you first started the project the customer said that the units should be in inches, but near the end of the project the customer calls to tell you that they now need to be in millimeters. So now your job is to change the units from inches to millimeters in every single one of the CAD files used in the project. What are you going to do? There are hundreds of files and you can’t open every one of them manually and then change the units. One solution would be to use the CAD system’s Application Programming Interface (API) to automate this operation. A CAD system’s API allows programming languages, such as VB.Net, to access specific CAD functions in order to automate repetitive tasks, such as: changing the units, exporting files, and other batch operations.

 

How would you use the API to automate this particular operation? In this case you could create a program that loops through all the files in a folder and changes the units of each CAD file. What code would you use? One way would be to use the Dir function (which is available in Visual Basic, VB.Net and VBA).  Here is what the code would look like:

 

fn = Dir(”C:\folder\*.CAD file extension”)   ‘sets the folder to loop

Do While fn <> “”   ‘keeps looping until it has gone through all the files

‘Open the CAD file *

‘Change the units *

‘Save the CAD file *

‘Close the CAD file *

fn = Dir    ‘goes to the next CAD file in the folder

Loop

 

* Refer to your CAD system’s API for the code to do these steps

 

Note that this routine works in: SolidWorks, CATIA, NX and Pro/E. Of course the API code for opening the file, changing the units, saving the file and closing the file is different in each CAD system. However, the Dir function and the Do While Loop work for all these systems since they are actual VB functions and are completely independent of the CAD system you are using.

 

This is only one example. There are an infinite number of tasks that can be automated using your CAD systems API in combination with Visual Basic, .NET or VBA. For more information please feel free to contact us.

 

- by Joseph Vera