Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating x,y,z Excel/.txt File from Point Set 2

Status
Not open for further replies.

mcclark

Aerospace
Jul 21, 2011
31
I created a point set of ~8000 points to describe a surface. I want to create a .txt or excel file from this point set with the x,y,z locations of all the points. I've tried using "NX Open Grip" to compile a .grs/.grx file that I found on another thread post, however I dont have the license to create a .grx file. Can someone provide me with .grs and .grx files? I'm able to execute GRIP files fine, but don't have the license to create my own. Thanks
 
Replies continue below

Recommended for you

Code:
$$ PROGRAM: PTS_TO_TABLE.GRS
$$
$$ KEYWORDS:
$$
$$ ABSTRACT:
$$   DISPLAYS A CHART SHOWING THE X,Y,AND Z
$$   COORDINATES OF X AMOUNT OF GENERIC POINTS.
$$
$$ RELEASE HISTORY:
$$   01-FEB-91 Modified slightly by:
$$             Ken Lambrecht
$$             CAD Potential, Inc.
$$             2820 Wilderness Place, Suite D
$$             Boulder, CO 80301-5454
$$             (303) 938-1224
$$
$$ Required Subroutines: (None)
$$
$$ REQUIRED DATA/PART FILES: (NONE)
$$
$$ AUTHOR:  M A SICKING
$$ COMPANY: McDonnell Douglas
$$
$$ SYSTEM TYPE: VAXstation 3100
$$
$$ THEORY/VARIABLE USAGE:
$$
     ENTITY/$
            pt
     NUMBER/$
            x(100),y(100),z(100)
     $$
     MASK/2
     count = 1
L1:
     IFTHEN/count > 10
            MESSG/'Max. of 100 points','reached.'
            JUMP/L3:
     ENDIF
     GPOS/'PICK POINT '+ISTR(count)+' - TERM WHEN DONE',$
          x(count),y(count),z(count),r
     JUMP/L2:,L3:,L3:,,,r
     count = count + 1
     JUMP/L1:
L2:
     count = MAXF(1,count-1)
     JUMP/L1:
L3:
     PRINT/' ID        X         Y         Z'
     PRINT/' '
     DO/L4:,loop_count,1,count-1
        PRINT/USING,'#@@ #@@@@.@@@@#@@@@.@@@@#@@@@.@@@@',loop_count,$
              x(loop_count),y(loop_count),z(loop_count)
L4:
     HALT

This is what I found yesterday while browsing through the forums, NX libraries, and online NX GRIP help. It looks like it should do what I want it to do. I assume if I replace 100 with 8000, it will run through all 8000 points instead of just 100 points? Thanks
 
OK, attached is an edited and compiled copy of the program. It runs but my testing was minimal. However, I suspect that you will not really like how this program works, certainly not if you need to select something like 8000 points.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
I tried your program, but in order to make it work, it was making me select each point individually, which is obviously way too time consuming.

What I'm trying to do is this: I have a surface on which I've created a point set with approx. 8000 points. I want to be able to output this point set into an excel or .txt document in order to do verification of the surface. Is there another way to do this? It seems like NX should have this feature built into the software. Maybe I'm just not finding it? I'm running NX 7.5.
 
If you're really looking to do inspection, perhaps you should look at the NX Inspection module.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
.... or just use whatever software that came with your CMM, Romer arm, or whatever else you are using. If your taking that many points I assume you are using an NC controlled machine of some kind.
 
Moudy1, thanks a lot for the files. I made some modifications to your file by making it calculate up to 15,000 points and with a 9 decimal place accuracy. I had the license to compile/link GRIP files for a few weeks, but I no longer have it. I need a file to get up to 14 decimal place accuracy. I remember a few weeks ago, when I tried to go above 9 decimal places, the program would add a 1 to the smallest decimal place. Can someone please help? I've attached the .grs that I'm currently using. I'm on NX 7.5.

Is it true that NX 8 has a built in feature to export a point set to a .txt or .xls file?
 
 http://files.engineering.com/getfile.aspx?folder=77616cf9-0949-46af-991f-f3418d9ba8d1&file=ptcloud_to_txt.grs

According to the Grip reference online documentation 9 is the maximum supported.
 
Despite what GRIP options there are to control decimal places, all results are stored using 14 decimal places (system precision adjusted to mitigate round-off errors). Granted, when GRIP is asked to display the value of a parameter it will only be shown with a maximum of 9 decimal places, but value of the number will still be stored as 14 places inside of NX.

Now as for NX 8.0 having some new built-in mechanism for exporting the X,Y,Z values of a set of points to a .txt or .xls file, I'm not aware of what that would be. Granted, there is a new option in the Patterning Feature that IF you created a 'Pattern Feature' consisting of Points, that I could extract an .xls file of THOSE locations, but ONLY if the Pattern Feature function was used to create the set of points in the first place. That is, if the points already exist, either individually or as part of s 'Point Set' feature, there is NO way to load THOSE locations into this function.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
Does anyone have a macro that will export a point set to a .txt or .xls file? Am I really the only one who has needed to do this in NX? Any help would be greatly appreciated.
 
If you're able to execute a GRIP program, the attached will allow you to select up to 1000 points in the current Work part and will write the data to a comma-delimited .dat file.

After downloading the file, edit the file extension from .zipper to .zip before attempting to extract the files.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
I can execute GRIP programs, but don't have the license for compiling/linking .grs/.gri files in the NX Open Grip command window. I need a program to get me 14 decimal place accuracy for up to 15,000 points. Is this possible? If not, I can try to use your GRIP program and go 1000 points at a time. Thanks
 
John,

When I tried to run your GRIP file, I came across a few errors. The first two popped up after executing the file, but before I selected any points. The last two errors came after selecting the points and clicking "ok". The first three errors went away after I clicked "CONTINUE" but the last error wouldn't disappear after clicking "CONTINUE", which forced me to terminate the GRIP. Please help, thanks.
 
Exactly what was the wording of the messages that you got when you ran the program?

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor