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!

Macros losing conection with CATIA

Status
Not open for further replies.

TiagoFigueiredo

Industrial
May 22, 2013
494
PT
I'm having something weird happening with catia and macros.
Sometimes when i have a part document opened macros left to interact with catia and i can not understand why. I have tested with CATScript, CATvba, vb.net. To solve this, I need to reboot catia, or open a CATProduct and work for a while in that product.

An example of what is happening: When this happens, if the macro needs something selected to continue running, I select the needed things, and macro says to me that there is nothing selected, then I tried to debug, and I see that for macro there is nothing selected (selection1.count=0, or ...selection.item(1).value, the value of variable remains empty). After that i try to rerun the macro, and there is an error that don't find the active document.


This is giving me completely crazy.

Tiago Figueiredo
Tooling Engineer

Youtube channel:
 
Replies continue below

Recommended for you

Happened to me with R26. After log off / log on everything worked well during a day. With R27 there's no connection loss at least for now.

Regards,
Jenia Ladkov
 
Have you double checked that the version you are executing code in is the version currently registered with Windows (Search on /Regserver and /UnregServer from some reference on how to change).

Generally I have used the following registry key to check which version of CATIA is currently registered with the operating system.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\CNEXT.exe

--Doug
 
May be it's not a Catia issue. I think maybe it's Visual studio. I have some old Apps developed using VB6 and newer had connections loss during Catia session. This happened with Apps developed using VS 2015. Anyway with R27 we don't have connection issues. I'll upload tomorrow what's new in R27.

Regards,
Jenia Ladkov
 
Do you need a connection in CATscript, catvba?

Regards,
Jenia Ladkov
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top