×
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

3D Annotations

3D Annotations

3D Annotations

(OP)
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

RE: 3D Annotations

(OP)
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

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