Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

3D Annotations

Status
Not open for further replies.

woman49

Automotive
Joined
Mar 30, 2015
Messages
2
Location
MX
hello everybody

im new in CATIA V5R20 and i have a couple of questions,

first, i wonder when using 3D annotations within a part or an assembly, is there any way to retrive the annotation leders coordinates in vbs

second, this same annotations, is there any way like fix them, what i mean is to settle, in vbs

i hope you can help me with this, have a nice day all of you

 
hello, hope somebody can help me

i am working with vba, since is the only way a found a solution, here is the code a have:

Dim vwTPSView As DrawingView
Dim dX As Double
Dim dY As Double
Dim X1 As Double
Dim Y1 As Double
Dim Z1 As Double
Dim X2 As Double
Dim Y2 As Double
Dim Z2 As Double
Dim anAnnotation As Annotation

Sub CATMain()

Set partDocument1 = CATIA.ActiveDocument
Set selection1 = partDocument1.Selection

Set anAnnotation = selection1.Item(1).Value


Set txtAnnotation = anAnnotation.Text.Get2dAnnot()
dX = txtAnnotation.X
dY = txtAnnotation.Y
MsgBox dX & " " & dY

Set vwTPSView = txtAnnotation.Parent.Parent
Set drwLeaders = anAnnotation.Text.Get2dAnnot.Leaders
drwLeaders.Item(1).GetPoint 1, ox, oy
MsgBox ox & " " & oy

'vwTPSView.GenerativeBehavior.GetProjectionPlane X1, Y1, Z1, X2, Y2, Z2
'A = MsgBox("Coordenadas del plano" & vbCrLf & dViewPlaneX1 & " " & dViewPlaneY1 & " " & dViewPlaneZ1 & vbCrLf & dViewPlaneX2 & " " & dViewPlaneY2 & " " & dViewPlaneZ2, vbOKOnly + vbInformation, "Vectores del plano")


vwTPSView.GenerativeBehavior.SetProjectionPlane 1, 0, 0, 0, 0, 1
Set MyLeader = drwLeaders.Add(7649.9594, -347.53)
Call drwLeaders.Remove(1)
anAnnotation.SetXY 7520.34250858, -322.53085385

texto = anAnnotation.Text.Text
anAnnotation.Text.Text = texto

End Sub

The issue i am dealing with, is that when setting the projection plane to the note, this note appears to be far away from its reference position,

i want to know if there is any way to change the view of the annotation without lossing its geometrical reference.

thak you for your time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top