Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

VBA to Inactivate View from current sheet 1

Status
Not open for further replies.

Amathex

Aerospace
Sep 4, 2013
3
CA
Hi,

I'm trying to inactivate view since I have previously activate it for modification purpose. Unfortunatly, I did'nt find any opposite method of Drawingview.activate. Does any one know a way to do this in VBA.

Thanks
 
Replies continue below

Recommended for you

Hi Ferdo,

I want to close my drawing without any active view. Activate a sheet does not desactivate view.

Regards
 
Interesting, for me it does...

Code:
Language="VBSCRIPT"
Sub CATMain()

CATIA.StartCommand "Fit All In"

Dim drawingDocument1 As Document
Set drawingDocument1 = CATIA.ActiveDocument
Dim selection1 As Selection
Set selection1 = drawingDocument1.Selection
selection1.Search "Name=Sheet*,all"

CATIA.StartCommand "Activate Sheet"
selection1.Clear

CATIA.StartCommand "Save"

End Sub

Regards
Fernando

 
Hi Ferdo,

Your right, if I make search to select all Sheet, it works find. I don't understand why ?

Thanks for your support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top