×
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

TPSVIew

TPSVIew

(OP)
goodmorning everybody

i want to get the plane coordinates of a TPSView in CATIA vba so i can compere those coordinates with the annotations in the product, here is the code

Dim vwTPSView As DrawingView
Dim dX As Double
Dim dY As Double
Dim dViewPlaneX1 As Double
Dim dViewPlaneY1 As Double
Dim dViewPlaneZ1 As Double
Dim dViewPlaneX2 As Double
Dim dViewPlaneY2 As Double
Dim dViewPlaneZ2 As Double
Dim anAnnotation As Annotation
Dim annotationSet1 As AnnotationSet

Sub CATMain()

Set partDocument1 = CATIA.ActiveDocument
Set selection1 = partDocument1.Selection
Set product1 = partDocument1.Product
Set products1 = product1.Products
Set productDocument1 = CATIA.ActiveDocument

Set anAnnotation = selection1.Item(1).Value
Set AnnotationSets = productDocument1.Product.GetTechnologicalObject("CATAnnotationSets")
nanot = AnnotationSets.Count
For i = 1 To nanot

Set annotationSet1 = AnnotationSets.Item(i)
Set TPSView1 = annotationSet1.TPSViews.Item(1)
anAnnotation.TransfertToView (TPSView1)

Set txtAnnotation = anAnnotation.Text.Get2dAnnot()
Set drwleaders = anAnnotation.Text.Get2dAnnot.Leaders
Set vwTPSView = txtAnnotation.Parent.Parent

vwTPSView.GenerativeBehavior.GetProjectionPlane dViewPlaneX1, dViewPlaneY1, dViewPlaneZ1, dViewPlaneX2, dViewPlaneY2, dViewPlaneZ2 'COORDENADAS DEL PLANO DE TRABAJO DE LA NOTA
texto = anAnnotation.Text.Text 'TEXTO DE LA NOTA
Set txtAnnotation = anAnnotation.Text.Get2dAnnot()
drwleaders.Item(1).GetPoint 1, ox, oy

Next

i have the proyection plane for the annotations but i donknow how to get those coordinates for the TPSView.
i hope you can help me out with this

thank you

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