proxima_cygnus
Aerospace
- Jun 16, 2023
- 7
I'm trying to build a model that uses expressions that have x y z variables and create points at each x y z. I have a python script that creates a random number of x y z coordinates and exports it as a .exp file for you to import it as an expression. For example, in the script you can specify n number of points, and it'll generate a random value for x1, y1, z1 ... xn, yn, zn. These are then stored in a .exp file on separate lines, so that when you import the .exp in NX, you'll have expressions x1, y1, z1,... xn, yn, zn in the expressions table. I need to be able to automatically create points using these x y z coordinates, so that every time you edit the python script, you just need to import the .exp file and the model will update with n number of points using the randomized x y z coordinates. I tried using a journal file and edited the code to include a for loop to create each point, but haven't had any success. I'm looking for any tips on how to achieve this, or if there's a better alternative approach. Thanks!