×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Coordinate points data in drafting from specified WCS

Coordinate points data in drafting from specified WCS

Coordinate points data in drafting from specified WCS

(OP)
Need Coordinate points data from a specified WCS (i.e. not from Absolute Coordinate system) in drafting as table if possible Parametric values of a pointset created in model

Thanks

RE: Coordinate points data in drafting from specified WCS

When working on the face of a Drawing there is real 3D concept like a WCS. Any point 'measured' on the face of the Drawing will be in Drawing space as if you were using a ruler on a paper Drawing. What you need to do is leave Drafting, establish you frame-of-reference, capture the coordinates of the points of interest, record them in a spreadsheet and then when back on the drawing, create a table with values in the fields inherited from the spreadsheet file.

As for getting the point coordinate data into a spreadsheet, there have been several programs/journals posted here over the years that can help you with that task (I've even got a couple of GRIP programs that help do this if you can execute GRIP on your system). Note that this will result in a non-associative relationship between the points and the values in the table. If you wish associative results, while that's possible, it will require a bit more work but it could be done, depending of course on the number of points involved. If it's only a few, no more than 10 or 20, it wouldn't take all that long to set-up, maybe an hours worth of work, which if associativity is not important and you have many more points than say 10 or 20, then the separate program to extract the data via a spreadsheet would be the more productive solution and it could be done in a matter of minutes.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Coordinate points data in drafting from specified WCS

Sorry but the first sentence of my post above should have read "When working on the face of a Drawing there is NO real 3D concept like a WCS."

Sorry if that confused anyone but I thought I should correct this omission before it did.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Coordinate points data in drafting from specified WCS

(OP)
Thank you John

Yes, I have seen couple of GRIP programs/Journals, but all of them measuring the coordinate points from Absolute Origin.

I want to select from where I want to measure the coordinates.

I am having about 150 points, and ready to spend 2-3 hrs if its possible to get parametric values

RE: Coordinate points data in drafting from specified WCS

I wouldn't even try to parametrically link 150 points!

Attached is a GRIP program that will write the X,Y,Z coordinates of up to 1,000 points in a comma-delimited text file which will make it easy to load them into a spreadsheet. Read the header of the .grs file for instructions on how to run the program.

After you download the attached file, edit the file extension from .zipper to .zip before attempting to extract the program files.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Coordinate points data in drafting from specified WCS

(OP)
Thanks Again John,


In the program the coordinate values are given from Absolute, but I want to make (0,0,0) at some other point or WCS.
From that point or WCS I need coordinates.

RE: Coordinate points data in drafting from specified WCS

Just set the WCS to where you want it and run the program. The points are relative to the origin of the WCS, NOT absolute. And remember that a Datum CSYS is NOT the WCS.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Coordinate points data in drafting from specified WCS

You can create an NX spreadsheet that has associative cell values listing the XYZ coordinates of any number of points. Equally you could do the same for the "point" at the origin of a datum CSYS that you could then move around as if it were a WCS of sorts. A bit of subtraction on the spreadsheet and you'd have your live values which you can output to a Tabular Note on a drawing.

Is that the sort of thing you're after?

Chris Abbott
TEAM Engineering
www.team-eng.com

RE: Coordinate points data in drafting from specified WCS

(OP)
Thank you John/Chris

@john
When I am running the program in Modeling its giving the values from WCS and if I am running it in drafting mode Values are comming from absolute.
and as I created pointset values are not in sequence (order like pt1, pt2,...)those are shuffled
@Chris
I dont know the values to create spreadsheet. just I am creating pointset using curve equally spaced 150 points.

RE: Coordinate points data in drafting from specified WCS

Assuming pre-NX9:

- Change selection filter to "Point" (this is important. Point feature =/= point geometry)
- Select one of the points, right-click > Properties
- General tab > Change name to POINT1
- Click OK
- Tools > Spreadsheet
- Select cells A1 to C1
- Type =POINT("POINT1")
- Press Ctrl+Shift+Enter to populate the array
- You should have XYZ values for the position of that point - associative. If you change the point location, it changes the values in the spreadsheet

Do the same for all other points (POINT2, POINT3...) and the point at the origin of a Datum CSYS which you can move around. In the spreadsheet, do the subtraction of XYZ values from the datum CSYS.

Chris Abbott
TEAM Engineering
www.team-eng.com

RE: Coordinate points data in drafting from specified WCS

Using the method described by Chris, you may need to run the "update for external change" command to update the tabular note if/when the points move.

www.nxjournaling.com

RE: Coordinate points data in drafting from specified WCS

As I stated in my first response, there is NO concept of a WCS in Drafting. You have to run this in Modeling to get the true 3D point data.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Coordinate points data in drafting from specified WCS

(OP)
I am using NX8.5

RE: Coordinate points data in drafting from specified WCS

(OP)
And i dont know the values to create the points.
I need to divide the curve into 150 points and the curve is variable

RE: Coordinate points data in drafting from specified WCS

I just assumed that you already had points in your file. You never mentioned that you needed help CREATING them. You only asked about getting the coordinate data, as if the points were already there.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Coordinate points data in drafting from specified WCS

(OP)
Yes John,

I am creating points by pointset using along curve equal parameter
start % as 0
End % as 100
Number of points 150

If the model updates (i.e. curve length varies ) points will be updating, so that I asked xyz coordinates

RE: Coordinate points data in drafting from specified WCS

With NX 8.5 your only solution would have to be a custom NX Open application to collect the coordinate data and have it update after any changes. However, with NX 9.0 you could at least get a series of expressions (a minimum of 150) which would assiciativily collect the coordinate data of the points (you'd still have to create the 150 'Measure Point' features but that could be automated using a Journal). Now you'd still need to do a fair amount of work to get that point data into tables on your Drawing but it could be done.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Coordinate points data in drafting from specified WCS

(OP)
HI John,

Is it possible to make some changes in your grip program like
1) It should ask the file name while saving .dat
2) Is it possible directly to save as .txt (should ask the file name before saving)

RE: Coordinate points data in drafting from specified WCS

You can't bring-up the normal Windows Explorer save-as dialog using GRIP. The best that could be done is to ask the user to type in a text string that is to be used as the name of the file. And yes, I think the file extension can be .txt instead of .dat.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Coordinate points data in drafting from specified WCS

(OP)
Thank you John,

As I don't know much about GRIP program, is it possible to you to make changes as suggested and attach it again.


Regards
Patil

RE: Coordinate points data in drafting from specified WCS

Let me work on that and get back to you later today (I'm in the middle of a meeting right now ;-)

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Coordinate points data in drafting from specified WCS

OK, attached is an updated GRIP program which will save the data file with a '.txt' extension, but still in the 'C:\Temp' folder. When running the program, the data file's name will default to the name of the Part file with some additional added text, but the user can either accept the default name or enter one of his own. As before, after downloading the file, edit the file extension from '.zipper' to '.zip' before attempting to extract the files.

Let me know if this is working as you expected it to.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Coordinate points data in drafting from specified WCS

If you don't want to learn GRIP (and I can't imagine why anyone would want to learn GRIP, these days) then you can write the point file using a simple VB program that calls NX/Open functions. There are lots of examples around that show how to do this. Learning how to write a text file using VB is a useful skill that might come in handy elesewhere. If you can't find good examples, ask again, either here or at NXJournaling.com.

Alternatively, your NX/Open could automatically create the 150 "Measure Point" features, and you'd get assocoativity.

RE: Coordinate points data in drafting from specified WCS

(OP)
Thanks you so much John

RE: Coordinate points data in drafting from specified WCS

(OP)
Hi John,

Thank you for the grip program. we need some changes in it, is it possible to compile once again
1). Is it possible to change the path (location) of .txt file. Manually can we set the path for saving the .txt files
2). Dont want the ** End of File ** line in last.
3). is it possible to create a VB program for it


Thanks & Regards
Patil

RE: Coordinate points data in drafting from specified WCS

Here is a more modern approach ... it's a VB program that calls SNAP functions. So, it can display the standard Windows "Save As" dialog to let the user decide where to put the point file. And, since it's just VB, and it's simpler than the GRIP code, there are lots of people who know how to modify it. It could be changed (by someone other than me) to use NX/Open functions, instead of SNAP functions.


CODE --> VB

Option Infer On
Imports Snap, Snap.Create, Snap.UI, Snap.NX.ObjectTypes
Imports System.Windows.Forms

Public Class MyProgram

   Public Shared Sub Main()

      ' Create a selection dialog to slect multiple points
      Dim dialog = Selection.SelectObject("Select any object")
      dialog.SetFilter(Type.Point)
      dialog.AllowMultiple = True

      ' Display the dialog and get a result
      Dim result = dialog.Show()

      ' Exit if user clicked Cancel or Back button
      If result.Response = Response.Cancel Or result.Response = Response.Back Then Return

      'Create list of strings to hold point info
      Dim pointList = New List(Of String)

      ' Cycle through points, adding them to list
      For Each obj In result.Objects
         Dim pt = TryCast(obj, Snap.NX.Point)
         If pt IsNot Nothing Then
            pointList.Add(pt.Position.ToString("F12"))
         End If
      Next

      ' Display a Save As dialog
      Dim saveDialog As New System.Windows.Forms.SaveFileDialog()
      saveDialog.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
      saveDialog.FilterIndex = 1

      ' Write out the point data
      If saveDialog.ShowDialog() = DialogResult.OK Then
         System.IO.File.WriteAllLines(saveDialog.FileName, pointList)
      End If
     
   End Sub
End Class 

RE: Coordinate points data in drafting from specified WCS

The errors are because you don't have a SNAP license. You'll need to replace the calls to the SNAP functions by calls to NX/Open functions.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources