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!

How to activate the sheet to which the selected view belongs?

Status
Not open for further replies.

Mirme.lee

Aerospace
Jul 18, 2024
4
Catia Drawing..

What is the VBA Code that activates the sheet to which the selected view belongs? I plan to use the selection function to select the view.
 
Replies continue below

Recommended for you

Hi,

I think that the sheet is allready activated if you have selected a view.

Here the code to retrieve the sheet name:

Code:
Sub CATMain()

Dim Document1 As Document
Set Document1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = Document1.Selection

Set myview = selection1.Item(1).Value
Set mysheet = myview.Parent.Name

End Sub

Regards
Marc
 
Thank you all.
Thanks to you, my work has become easier.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor