×
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

SWITCH CATPART 3D ANNOTATION ON AND OFF

SWITCH CATPART 3D ANNOTATION ON AND OFF

SWITCH CATPART 3D ANNOTATION ON AND OFF

(OP)
Hello Ferdo and Others,

Do you know how (or at least which CATIA function) to

1) Turn/Switch CATPART 3D ANNOTATION on and off with a VBA macro?
2) Search, obtain and display Captures' value (ex: in the attached image, first capture value is "All")

Thank you All in advance

Quin

RE: SWITCH CATPART 3D ANNOTATION ON AND OFF

please use the proper function to upload Images it will make it easier for everyone.

Eric N.
indocti discant et ament meminisse periti

RE: SWITCH CATPART 3D ANNOTATION ON AND OFF

why don't you use the upload image function (near the smiley face) instead of the attachment?

Eric N.
indocti discant et ament meminisse periti

RE: SWITCH CATPART 3D ANNOTATION ON AND OFF

(OP)


Sorry...never known and used.....now the image is here.

Can you help about my questions above?

1) Turn/Switch CATPART 3D ANNOTATION on and off with a VBA macro?
2) Search, obtain and display Captures' value (ex: in the attached image, first capture value is "All")

Thank you All in advance

Quin

RE: SWITCH CATPART 3D ANNOTATION ON AND OFF

I created this last year, it turns on all FT&A features in a Catia product.
It should work for an individual part.

CODE --> CATScript

Sub CATMain()

Set  ProductDocument1 = CATIA.ActiveDocument
Set Product1 = ProductDocument1. Product

Dim ProductDoc1_As_Document
Set ProductDoc1 = Catia.ActiveDocument

Dim Selection1_As_Selection
Set Selection1 = ProductDoc1.Selection

selection1.Search "CATTPSSearch.CATFTAElement,all"
Set visPropertySet1 = Selection1.visProperties
VisPropertySet1.SetShow 0
Selection1.Clear

Dim specsAndGeomWindow1 As Window
Set specsAndGeomWindow1 = CATIA.ActiveWindow

Dim viewer3D1 As Viewer
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer

Dim viewpoint3D1 As Viewpoint3D
Set viewpoint3D1 = viewer3D1.Viewpoint3D

viewer3D1.Reframe 

Set viewpoint3D1 = viewer3D1.Viewpoint3D



End Sub 

RE: SWITCH CATPART 3D ANNOTATION ON AND OFF

(OP)
Hi Zecha,

Thank you for your post.

I am testing your code with CATIA 2015 with full licenses but

1) It does not work in both part document and product doc. See attached image for error.
2) Can it be run with VBA 7 in Catia 2016? If not, could you please show me how to?

Thank you in advance

Quin



RE: SWITCH CATPART 3D ANNOTATION ON AND OFF

Right off the bat, I notice you are using the wrong type of file, catvbs instead of CATSript.

Copy my code and paste it into Wordpad and save it as a .CATSript file type and see how that works out.

As for the second part, I have no idea
I'm not good with coding outside of basic CATScripts.

RE: SWITCH CATPART 3D ANNOTATION ON AND OFF

(OP)
Hi Zecha,

I did exactly what you said above, run the code in CATScript but nothing (really nothing) happens.

Do you have any suggestions?

Quin

RE: SWITCH CATPART 3D ANNOTATION ON AND OFF

(OP)
Hi ALl,

I just tested the code in VBA with CATIA but the 3D annotation set does not switch on or off at all. I did reload the part document, run the code in VBA (as seen below) and I only see the part reframed (as there is viewer3D1.Reframe in the code).

I changed from ProductDocument to part document and I pasted my code below for your review.

========= SWITCH 3D ANNOTATION SET ON AND OFF ======

Sub CATMain()

Dim partDoc1, myPart1
Set partDoc1 = CATIA.ActiveDocument
Set myPart1 = partDoc1.Part

Dim CurPart As Document
Set CurPart = CATIA.ActiveDocument

Dim Selection1 As Selection
Set Selection1 = CurPart.Selection

Dim VisPropertySet1
Selection1.Search "CATTPSSearch.CATFTAElement,all"
Set VisPropertySet1 = Selection1.VisProperties
VisPropertySet1.SetShow 0
Selection1.Clear

Dim specsAndGeomWindow1 As Window
Set specsAndGeomWindow1 = CATIA.ActiveWindow

Dim viewer3D1 As Viewer
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer

Dim viewpoint3D1 As Viewpoint3D
Set viewpoint3D1 = viewer3D1.Viewpoint3D

viewer3D1.Reframe

Set viewpoint3D1 = viewer3D1.Viewpoint3D

End Sub
==============================

Please help me out

Thank you All

Quin

RE: SWITCH CATPART 3D ANNOTATION ON AND OFF

(OP)
Hi Ferdo,

Thank you for sharing your tool bar.

I downloaded, run TST - CATIA V5 Time Saving Toolbar.exe but the annotation still does not show up.

1) What is FTA (workbend) in genenral? I have never known, seen and used it. Please elaborate
2) How could I make your tool bar worked?
3) Could you please share your code of switch annotation on/off with me? I want to incorporate it with my code.

I am using CATIA V5 2015 on Windows 10, 64 bit.

Your prompt reply is much appreciated.

Thank you

Quin

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