Submitted by win.yamada on Wed, 07/30/2014 - 05:42
Forums:
I am not able to write the following code:
• creating spheres starting from a point cloud;
• each ball with the same color of the dot;
• for each color, assign a text.
Can someone help me?

re: creation of spheres
What version of NX are you on? Also, I'm not sure what you mean by "for each color, assign a text" - do you mean you want to add a note object?
Below is some code that works in NX 8.5. It is very basic, it just creates a sphere on every point in the file. I imagine that you'll want to add some code to limit it to certain points in the file (only those on a given layer, only those in point sets, etc).
Doubt
Hello,
I tried to use this journal, but my file is Weld Assistant... I would like to use the same idea but there is a different detail: all the points are green color and the difference is the symbol... I used this code and create sphere green color... Could you help me please?
In Advanced... Tks!
re: doubt
I don't quite understand your request.
Do you want to create something other than spheres?
Do you want spheres, just a different color?
Please explain your requirements.
I have a spot weld file,
I have a spot weld file, created in weld assistant. But this spots are in green color, all of them! The difference are the symbols (X or asterisk). I tried using the code above, but created green spheres. I would like to create red sphere for asterisk symbol and green symbol for X symbol. In each spot weld I know has a attributes called NUMBER OF SHEETS WELDED.
When the attribute NUMBER OF SHEETS WELDED = 2 green sphere
When the attribute NUMBER OF SHEETS WELDED = 3 red sphere
Do you understand me?
I believe what the poster is
I believe what the poster is referring to is the weld assistant module has different point symbols. example a 2t(2 thickness weld) is a point symbol with 2 intersecting lines and a 3t(3 thickness weld) is a point symbol with 3 intersecting lines.
I don't have the Weld Assistant license, but I do get a lot of files in that have these types of points.
I too manually create different color 5mm dia spheres for each weld type on these points. This can be time consuming on larger assemblies.
re: weld points
I've never used the weld assistant and it appears that I don't have a license available to start any time soon. Could one of you email me a small sample file with a few different weld type points in it?
info@nxjournaling.com
Thanks!
file
I've sent a file.
The 'N' represents a weld nut, The 'S' a weld stud, the point a 2t weld, the asterisk a 3t weld.
Email
I sent you by email!
Tks!
re: sphere on weld point
Thanks to both of you for the example files. The code below will place a green sphere (color 36 in the default cdf) on a '2 sheet' weld point and a red point (color 186 in the default cdf) on a '3 sheet' weld point.
Tks!
Tks for you help!
Works awesome, could
Works awesome, could potentially save hours of work.
re: update
Update to the code above; this version creates a datum axis indicating the weld vector (fixed datum axis). The datum axis and sphere features are named to match the weld point ID. And finally - the weld ID, location, weld vector, and number of sheets welded are reported to the information window.
Create Cylinder Dia 16.0 mm in the place of Spot weld
Thank you for journal for creating Sphere in the place of Spot weld. It is more useful. But my requirement is to create a Cylinder Dia. 16mm instead of Sphere. Please let me know if any macro available.
Create Lines Instead of Solid Welds
Hi
Is there any program that can create lines instead of weld .
Example i have 10 tack welds of 20 mm length connecting two plates.
If NX could create 10 lines\curves of 20 mm rather than creating solid welds .It would be more appreciated.