×
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

DISPLAY ABS UNITS OF POINTS

DISPLAY ABS UNITS OF POINTS

DISPLAY ABS UNITS OF POINTS

(OP)
I am making a drawing of a tube structure with centerlines. I need to display the absolute coordinates of the tangency points on the tube paths, or even the model. I want to do this with ext lines or arrows, or just the coords next to the point with an arrow going to it.

Am I missing something simple??

Thanks.

RE: DISPLAY ABS UNITS OF POINTS

RMB click in a drawing and select More Dimensions then select whichever style best suits your needs.

cheers
Helpful SW websites  FAQ559-520
How to get answers to your SW questions  

RE: DISPLAY ABS UNITS OF POINTS

nitan (Automotive)
(OP)
Thank you, unfortunately, the More Dimensions only covers distances, I would like to show the absolute xyz location. All of the extension lines just make things messy.

I would like to do this in a drawing, or on the model display.

Again, thanks for your help.

RE: DISPLAY ABS UNITS OF POINTS

I'm confused ... can you post an image of what you really want and explain what you mean by "absolute xyz location". Absolute from where?

Quote (Original Post):

I want to do this with ext lines ...

Quote (Second Post):

All of the extension lines just make things messy.
????

cheers

RE: DISPLAY ABS UNITS OF POINTS

It sounds like you may be trying to do something like this:  thread559-155117.  It's not great, but it's a usable workaround.

RE: DISPLAY ABS UNITS OF POINTS

(OP)
HI,

I can't get to the drawing now, but I mean the xyz coordinates from the origin of the coordinate system.
I just want to indicate a point on the path line, and its absolute location without making the drawing or model space cluttered up with extention lines.

Any help would be appreciated.
Thank You.

RE: DISPLAY ABS UNITS OF POINTS

In order to use the macro posted in the thread I linked to you would create a 3D sketch in the model and place a sketch point at each location where you want the XYZ coordinates.  Then in the drawing you would show the 3D sketch, select points one at a time and run the macro for each, and then hide the 3D sketch.  You would end up with a note with leader pointing to each point of interest giving XYZ coordinates.

RE: DISPLAY ABS UNITS OF POINTS

(OP)
Hello,
I have run the macro like you said, but I am getting nothing. No instructions or anything.

Am I missing something.

RE: DISPLAY ABS UNITS OF POINTS

Here are the steps for the macro to work correctly:

1. Insert a new 3D sketch in the model.
2. Place sketch points at each location you want coordinates for.
3. Go to the drawing and show that 3D sketch
4. Select one of the sketch points and run the macro

Repeat step 4 for each sketch point in the 3D sketch

5. (Optional) Hide the 3D sketch in the drawing.

RE: DISPLAY ABS UNITS OF POINTS

(OP)
Actually, I got the instruction for point number, but after I entered the number and hit enter, then I get an message saying "error 438, Object doesn't support this property or method."

Then, I go to debug the macro and the apparent bad line is:

"If SelMgr.GetSelectedObjectType3(1, -1) <> 25 Then".

I'm not sure how to cure this, but if anyone does, it would be appreciated.  

I am using Solidworks 2005-2006 student edition. Yeah, I know.

Thanks

RE: DISPLAY ABS UNITS OF POINTS

(OP)
Here is the whole macro:


Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Public Pfx As String
Dim myNote As SldWorks.Note
Dim SelMgr As SldWorks.SelectionMgr
Dim mySketchPoint As SldWorks.SketchPoint
Const FMAT As String = "0,00"
Const SF As Double = 1000
Sub main()

Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
Pfx = InputBox("Enter point number")
Pfx = "POINT " & Pfx & vbCrLf

If SelMgr.GetSelectedObjectType3(1, -1) <> 25 Then
    MsgBox "Select a 3D sketch point and run macro again"
    Exit Sub
End If

Set mySketchPoint = SelMgr.GetSelectedObject6(1, -1)

Set myNote = Part.InsertNote(Pfx)
If Not myNote Is Nothing Then
   myNote.Angle = 0
   boolstatus = myNote.SetText(Pfx & "X=" & Format(mySketchPoint.X * SF, FMAT) & _
               vbCrLf & "Y=" & Format(mySketchPoint.Y * SF, FMAT) & _
               vbCrLf & "Z=" & Format(mySketchPoint.Z * SF, FMAT))
   boolstatus = myNote.SetBalloon(0, 0)
   Set Annotation = myNote.GetAnnotation()
   If Not Annotation Is Nothing Then
      longstatus = Annotation.SetLeader2(True, 0, True, True, False, False)
   End If
End If
Part.ClearSelection
Part.WindowRedraw

End Sub

RE: DISPLAY ABS UNITS OF POINTS

Interesting.  I guess that means that you're a student.  Student posting on this forum is discouraged.  However, since your version is "2005/2006", I would imagine that the API will be the same as SW 2005.  The functions GetSelectedObject6 and GetSelectedObjectType3 are only available in 2006 or later.  Try changing

GetSelectedObjectType3(1, -1)
and
GetSelectedObject6(1, -1)

to

GetSelectedObjectType2(1)
and
GetSelectedObject5(1)

RE: DISPLAY ABS UNITS OF POINTS

(OP)
Hello Mr. Handleman,

Thank you for the solution to my headache. I knew that there had to be a way to do what I wanted, and you helped. It came out just as I wanted it.

Good luck to you.

P.S.
Not a student, just evaluating the prog, and I like it. I'm sure that the real one is even more useful.

RE: DISPLAY ABS UNITS OF POINTS

nitan ... just out of curiosity, would you mind posting an image of the finished dimensioned part/drawing.
See FAQ559-1100 for details.

cheers
Helpful SW websites FAQ559-520
How to find answers ... FAQ559-1091

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