Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SSS148 on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign space bar as enter by sendKeys in vba script 1

Status
Not open for further replies.

suresh070379

Mechanical
Nov 21, 2014
62
Hi,
I am using both AutoCAD and CATIA. I am trying to work the same way in CATIA as AutoCAD by giving commands through key board instead of using mouse.
I have customized the commands by user alias. My problem is when I give command in AutoCAD, after enter the command, I pressed the space bar for enter.
So, in AutoCAD command line, if we type the space bar, it will be treated as enter. But, when we come out from the command line for typing text, it will consider space bar for providing space.
I am expecting this property in Catia also that when I enter the space bar in command line, it should be treated as enter.
Please suggest any idea to assign space bar as enter.
From the internet, I came to know that, it is possible by sendkeys option in VBA scripting.
I tried the below script. But, it shows ‘VBScript compilation error’.
Kindly have a look and correct me the mistake.

SubCATMain()
CATIA.RefreshDisplay = True
SendKeys "{SPACE}", True ‘ENTER
End Sub

Suresh

 
Replies continue below

Recommended for you

No... please just let it go, CATIA is not Autocad.
If you really still wanna do this I hope somebody here knows how to help you though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor