Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Note with a selected point coordinates 1

Status
Not open for further replies.

AlvaroKJunior

Mechanical
May 18, 2006
5
Hi :eek:)
Is it possible to insert a note (annotation) with the coordinates of a selected point? I mean, this way:

Insert > annotations > note
click on a point, the arrow apears, i choose the position of the note, click again...
now I usualy type the point coordinates, like x=... y=... and z=...

Is it possible to do it automaticaly? But it must be a note, a macro that create a table or a file (excell or txt) wil not help..

The objective is a drawing that will be used to inspect +/- 30 points of a product on a tridimensional measuring machine.

I looked for a thead like this here and didnt find... Please help and Thanks a lot!
 
Replies continue below

Recommended for you

Place the points in the drawing and dimension them from the 0,0 you specify. Then link your note to the dimensions.

Then when your done, you can hide the dimensions by right clicking them and selecting "Hide". The view menu has a "Hide/Show" annotation command to control this behaviour.

Alternativly, You could also hide them by putting them on a layer and turning that off. This method may be more useful if you have lots of dimensions and you want to control their visibility separately. You can create several layers with different names. We used to do this for x-y Hole tables before they added the Hole table feature. You might try it and see if you can select sketch points but I think it's limited to model edge holes.

Jason

UG NX2.02.2 on Win2000 SP3
SolidWorks 2006 SP4.0 on WinXP SP2
 
Thanks for the idea, but it´s a lot of work! :)
this will take more time than type. It´s a good idea but i dont have so much time to do this way... other ideas?
 
this will take more time than type.
You must be a fast typist. [smile]

Are the points dimensioned in the model or the drawing?
Where ever they are, all you need do is click on them to have displayed in the note.

[cheers]
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
 
I forget where I've seen it, but there is a macro sample that shows the code that allows you to enter annotation text at a specified x,y on a drawing.
 
hauhau not so fast typist...
I´ll try to explain it better...

Model(it´s a plastic product): I have a 3d sketch with 30 points and these points are coincident with surfaces, axes, points, planes of this plastic product. No dimensions here, just points.

Drawing for the "3d measure machine" inspection of this plastic product:
2 isometric view (iso from up and iso from down)
30 notes with arrow showing the location of each controled point, and each note text is like this for example:

POINT 13
X= 232,44
y= -345,12
z= 123,10

The note text is what i would like to have automatic and not typed, But i dont know how. :)
I can not use a table, BOSS and client whant the point information in the note :(

Hope that now it´s easyer to understand my problem :)
 
When you place the points in the model, they must be located from geometry which has been placed using dimensions, right?

So you should be able to link (at least some of) the geometry dimensions into the note.


[cheers]
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
 
unfortunately not even one! :(
Complex model, to construct is not the same to inspect so no dimensions on the points :(
 
If you are using points in a 3D sketch you can use this macro. The values will not be linked to dimensions, so if you change your model you must edit or re-create the note.

To use the macro, first select one of your points, then run the macro. It will only work on 3D sketch points. Enter the point number and the note will be created.

You may have to work with the values of "FMAT" and "SF" to get the display like you want it.

Code:
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
 
Thanks a lot Handleman!!! I see your answers all over the place in the solidworks forum! Congratulations for been a so helpfull person!! Again, thanks a lot! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor