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!

Resume problem

Status
Not open for further replies.

Alan Lowbands

Aerospace
May 17, 2017
274
GB
Hi gents,
Can anyone tell me how I get this little bit of code to not return a Power input message, unavailable command: Update Current Sheet
everytime it meets a sheet the doesn't need an update.
Just using it to update and save all the open drawings.

best regards
Alan

************************************************
Sub CATMain()
Do
CATIA.StartCommand "Update Current Sheet"
CATIA.ActiveDocument.Save()
CATIA.ActiveDocument.Close()
Loop
END SUB
**************************************************
 
Replies continue below

Recommended for you

Something like this?

Code:
Sub CATMain()
    Dim oDrwDoc 'As Document
    For Each oDrwDoc In CATIA.Documents
        If TypeName(oDrwDoc) = "DrawingDocument" Then
            oDrwDoc.Update
            oDrwDoc.Save
            oDrwDoc.Close
        End If
    Next
End Sub
 
Thanks cilici,
works a treat.
also got the bounding box running from a stick. brilliant :)

cheers
Alan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top