×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Imrpove Speed when running a VBA solution in catia

Imrpove Speed when running a VBA solution in catia

Imrpove Speed when running a VBA solution in catia

(OP)
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!!

http://kxcad.com/cad-catia-caa-v5-automation-objects-InfInterfaces-Application--Object-.html

http://www.coe.org/Collaboration/DiscussionForum/ActiveDiscussions/tabid/210/aff/10/aft/101724/afv/topic/Default.aspx

RE: Imrpove Speed when running a VBA solution in catia

Quote:

...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: http://www.vbfrance.com/forum/sujet-COMMENT-EXECUTER-VBSCRIPT-CAS-ECHEANT-CATSCRIPT-DEPUIS-VBA_1055237.aspx
'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

RE: Imrpove Speed when running a VBA solution in catia

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources