“Playing” with CATIA Commands List

“Playing” with CATIA Commands List

     This article is a follow (and update) of Commands Lists in CATIA 3DEXPERIENCE and CATIAV5

According to a CATIA user (see https://www.eng-tips.com/viewthread.cfm?qid=424972 ), it can happens that standard CATIA command will not work so a macro like below it will be useless.

Sub CATMain()

On Error Resume Next

Set CATIA = GetObject(, "CATIA.Application")

CATIA.StartCommand ("Open in New Window")

End Sub

              After some research, I found that some commands can be replaced by (let’s say) a Command ID which is not in documentation. In this case, for the CATIA user which I mentioned before was OK and according to what he said,  was able to run some commands by replacing standard command with Command ID (still, I didn’t get the answer if by deleting CATSettings files everything returned to normal).

              The macro before can be replaced by

Sub CATMain()

On Error Resume Next

Set CATIA = GetObject(, "CATIA.Application")

CATIA.StartCommand ("OpenInNewWnd")

End Sub

              So, the standard command Open in New Window can be replaced by OpenInNewWnd .

              What I found up to now there are just few commands (more or less useful) which you can find them in my Commands_Lists_3DEx_and_V5.xlsm file here . In this file, I created a third sheet where you can select a cell containing a command and by running macro inside the Excel file, a CATScript will be created in c:\Temp\ folder and execution will be done automatically in CATIA V5. A short video with some examples can be found here . In this video I’m using a custom menu done in my Personal.xls file but you can run those macros in the usual way.

              I included also some other macros just to test few other things in 3DEXPERIENCE (like creating the c:Command_Name string in the clipboard, so you can paste the command directly in input box). This can be used also in CATIAV5, just follow the video.

              It would be great if you, CATIA users, will be able to complete this list with other commands. Thanks in advance for doing this.


Elyes MRABET

The Triple Engineer: [Mechanical Designer] + [Macro & EKL Developer] + [CATIA Trainer] = [Crafting Solutions] x [Saving Time] x [Transforming CAD Paradigm]

4 周

Fernando Petre Thank you for sharing Do you have any idea about the Command ID of the "Swap location" command of a dimension in a sketch?

回复
Tomasz Lewandowski

Lead Design Engineer w NG Engineering Sp. z o.o.

3 年

Thank you so much for this post! I've been struggling with exactly this issue just recently. Running the line CATIA.StartCommand "Open in New Window" in macros was randomly freezing the process by entering some kind of infinite loop (Sub was ending and starting all over again without any apparent reason to do so). Changing the parameter iCommandId to 'OpenInNewWnd' worked like a charm.

Dorin Denesan

inginer mecanic proiectant, responsabil grupa proiectare, la thyssenkrupp Bilstein Sibiu

7 年

Meanwhile, I've added a command button to run the macro after selection, and also modified the code to run both on Win 32 and 64 system. The improved file can be found at the following address : https://www.dropbox.com/s/3q1z2nbe7r3a0ll/Commands_Lists_3DEx_and_V5_x64.xlsm?dl=0

Jimmy Chang

director at ECARD CO,

7 年

Thanks!

回复

要查看或添加评论,请登录

Fernando Petre的更多文章

  • About Assembly Design Improve command from B.I.Essentials in 3DEXPERIENCE platform

    About Assembly Design Improve command from B.I.Essentials in 3DEXPERIENCE platform

    Have you ever wondered if you forgot to take all the degrees of freedom from an assembly? It is easy to check in the…

    1 条评论
  • 3Dconnexion SpaceMouse Enterprise and CadMouse Pro Wireless

    3Dconnexion SpaceMouse Enterprise and CadMouse Pro Wireless

    My new setup is here: 3Dconnexion #SpaceMouse Enterprise, #CadMouse Pro Wireless, and a 60% gaming mechanical keyboard…

    2 条评论
  • Rebuilding Aviation History: A Comprehensive Digital Restoration of the IAR 80 Fighter Using the 3DEXPERIENCE Platform

    Rebuilding Aviation History: A Comprehensive Digital Restoration of the IAR 80 Fighter Using the 3DEXPERIENCE Platform

    This article is not written by me, is a result of a demand made to ChatGPT. The demand was: "Please create an article…

  • Varianta dispozitiv montaj a aripii avionului IAR80FA

    Varianta dispozitiv montaj a aripii avionului IAR80FA

    Andrei Stan a fost si el in practica de vara in proiectul IAR80 Fly Again , practica derulata in ADC Eastern Europe…

    4 条评论
  • Profundor IAR80FA

    Profundor IAR80FA

    Gheorghe Razvan Radu, un alt student care a f?cut practica de vara in cadrul proiectului IAR80 Fly Again , a realizat…

  • Deriva avionului IAR80FA

    Deriva avionului IAR80FA

    Si Rare? Gabriel Baicu a f?cut practica de vara in ADC Eastern Europe , iar ansamblul pe care a f?cut un studiu…

    2 条评论
  • Directie avion IAR80FA

    Directie avion IAR80FA

    Andrei Dragomir-?fag?u este un alt student care a f?cut practica de vara in cadrul ADC Eastern Europe si care si-a ales…

    2 条评论
  • Studiu bechie avion IAR80FA

    Studiu bechie avion IAR80FA

    Andrei Chereche? este un alt student care a f?cut practica de vara in cadrul proiectului IAR80FA in ADC Eastern Europe…

    1 条评论
  • Palonier IAR80FA

    Palonier IAR80FA

    V?lcu Andrei Stefan este unul din studen?ii care a f?cut practica de var? anul trecut ?n cadrul proiectului IAR80FA in…

    3 条评论
  • Remember, Fly, Educate !

    Remember, Fly, Educate !

    Unul din scopurile proiectului IAR80FA, este bine scos ?n eviden?? ?n logo-ul asocia?iei pe care scrie: Remember, Fly…

    1 条评论

社区洞察

其他会员也浏览了