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!

CATIA VBA - Drawing Sheets 1

Status
Not open for further replies.

dardoemoria

Mechanical
Aug 11, 2022
2
NL
Hi colleagues,

I have problem with vba macro in CATIA V5.

I want to delete one of some sheets in my drawing.
Do you know how to solve it ?
it 's part of my actual code:

Code:
Dim drawingDocument1 As Document
Set drawingDocument1 = CATIA.ActiveDocument

Set Viewcollection = drawingDocument1.Sheets.Item(2)
Viewcollection.Activate

'now I want to DELETE this active sheet. Do you know how to do it ? THANKS ! :)

I was trying use methods like delete/remove. Unfortunately it doesn't work :(
Thank you in advance ! :)
 
Replies continue below

Recommended for you

Code:
Dim sel as Selection
set sel = CATIA.ActiveDocument.Selection
sel.Clear
sel.Add drawingDocument1.Sheets.Item(2)
sel.Delete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top