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.
Am I missing something simple??
Thanks.






RE: DISPLAY ABS UNITS OF POINTS
RE: DISPLAY ABS UNITS OF POINTS
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
????
RE: DISPLAY ABS UNITS OF POINTS
RE: DISPLAY ABS UNITS OF POINTS
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
RE: DISPLAY ABS UNITS OF POINTS
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
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
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
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
GetSelectedObjectType3(1, -1)
and
GetSelectedObject6(1, -1)
to
GetSelectedObjectType2(1)
and
GetSelectedObject5(1)
RE: DISPLAY ABS UNITS OF POINTS
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
See FAQ559-1100 for details.
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!