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!

Imrpove Speed when running a VBA solution in catia

Status
Not open for further replies.

tslewis

Structural
Sep 18, 2003
29
Does anyone have any advice as to how to speed up the processing time when running a custom vba code to interact with catia form excel say. (Im not referring to catScript).

For instance,when instantiating power copies or point features, my code can take more than 3 hours because I cannot disable the screen refresh. I suspect that this is the issue. I am experienced with other application API's and in such cases I have found that there is a massive speed differential when turning on/off graphical refresh.

I understand that the property

CATIA.refreshdisplay = false

does not work for some reason when run from VBA but it does work within catscript.

What effect does the interactive property have on the speed of processing?


CATIA.Interactive =false

many thanks in advance!!


 
Replies continue below

Recommended for you

...does not work for some reason when run from VBA but it does work within catscript.
...There are quite a few commands that don't work in Catia's imitation VBA interface. Some only work from a CATScript while others aren't "functional" unless you pay the $60K to buy a full blown seat of CAA.

I have been meaning to experiment with the 'CATIA.refreshdisplay = False' and 'CATIA.Interactive = False'...I was thinking of putting them in a simple CATScript file, and then calling them from a VBA macro (basically like a function) using the code below...or maybe I did try it and the VBA running forces Catia to be visible, so I gave up? Either way good luck and be sure to share any success you have.

Code:
'From: [URL unfurl="true"]http://www.vbfrance.com/forum/sujet-COMMENT-EXECUTER-VBSCRIPT-CAS-ECHEANT-CATSCRIPT-DEPUIS-VBA_1055237.aspx[/URL]
'Subject: Call .VBScript from VBA

Sub CATMain()
    Dim Shell As Object
    Set Shell = CreateObject("WScript.Shell")
    Dim ID As Variant: ID = Shell.Run("D:\CatiaMacros\Test1.CATScript")
    End
End Sub
 
Are you loading CATIA from a PDM system (like Enovia for example) or you are using files stored on your computer/network?

What release do you use?

Regards
Fernando
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor