Here is the final code. A bit of a kludge but it works. Reads a CSV file with 7 fields (Pt1X, Pt1Y, Pt1Z, Pt2X, Pt2Y, Pt2Z, Dia) and creates cylinders. Non-Timestamp Points can be simply deleted after creation.
'Adapted from NXJournaling.com
'...
I've been pulling what little hair I have left out trying to make an NX Journal to read a CSV file of Pt1X, Pt1Y, Pt1Z, Pt2X, Pt2Y, Pt2Z, Dia and generate a bunch of cylinders to create a trusswork. I've gotten bits and pieces to work (start point, length, diameter), but I can't figure out how...
That did it! Thank you. I was using .CoordinateSystem (Singular). I put together a rather clunky journal file to simply count coordinate systems (to make sure I was getting it to work) and it appears that it also counts the WCS as a coordinate system. With a CSYS and two additional...
I am working on a script to automate the clean-up of large STEP imports into NX11. One thing I would like to clean up is a principle axis that is added to every part (not a datum CSYS which I want to keep). I would like to rid my imported model of these. There may be a way to turn it off...
Wow Taylor! You get the prize for the most complete answer on Eng-Tips ever! Thanks.
I am really sorry to see simple text editing of interpart expressions go away, although I can understand the problem you were faced with. Manual access to the inner guts of the data is always useful. We are...
It could be that I simply don't understand how to use the new NX10 interpart expressions since I just started using NX10, but from the cheap seats it appears that they taken away some extremely useful functionality. GTAC indicated that they are in the process of improving it but it isn't done...
Here is an updated version of the NX Journal file so that it now assigns a mass to a body or multiple bodies in a part. It calculates the volume of all the bodies in the part, calculates a density and then assigns the density to all the bodies.
Option Strict Off
Imports System
Imports NXOpen...
I discovered a nice little hack today using multiple Excel sheets on a part. You can embed a PowerPoint (and I assume other object that Excel recognizes) into the SpreadSheet and save it. That way you can save very complex documentation within your part/assembly file without needing a PDM...
I see it now. I've never seen that command. Very interesting. Thanks! And I see your problem with the reference set and I'm sorry to say I have nothing to offer on that.
The simple wave link Mirror Body command creates just the standard MODEL reference set. Are you doing this in TC or NX? I don't see a "Create Linked Mirror Part" command in NX 9 Native.
I have kludged together a Journal from various sources to assign a mass to a body by calculating the density from the volume. It is pretty clunky, but does what I need. The only hitch is I can't figure out a simple way to execute the "Update Weight Data Now" command. When I record it I get...
I need to be able to create a bunch of empty dummy parts from a spreadsheet and assert a mass. I adapted a simple journal that creates new parts from a text file list but when I tried to record the "Assert Mass" command, it is not supported by the Journal recorder. I looked at creating a tiny...
I have been trying to sort out the image rendering options in NX. There are a number of parallel routes to create a high quality image and each seems to almost get me where I want (albeit in a very convoluted way). There is Visualization, Visualize Shape, and True Shading. I thought there was...
I'm trying to find a quick and dirty method to go from a general solid with planar sides to a frame. I have a large number of solids and would like to create frames for each quickly (this is just for a conceptual design, so I don't need a lot of exactness). I remember doing some tricks with...
That TraceARay sounds like it might be what I need. I got the brute force method working and it is giving me clean results so I'll have to try the TraceARay method on the next go-around. Here is the code in case it is of any use to anyone. It isn't pretty, but it does what I need:
Option...
This should work to eliminate false positives of an intersection:
Measure the distance between the vector and the solid. If not 0, they don't touch so ignore.
myDistance = workPart.MeasureManager.NewDistance(unit1, MeasureManager.MeasureType.Minimum, mybody, tempVector)
Then check to make sure...
Thanks to Frank this is almost doing what I need. It is so close. Unfortunately I discovered a problem with the way NX handles intersections. NX will provide an intersection even if it isn't actually piercing the surface. For example, if there is a hole in the surface and the vector goes...