×
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

Assign space bar as enter by sendKeys in vba script

Assign space bar as enter by sendKeys in vba script

Assign space bar as enter by sendKeys in vba script

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

RE: Assign space bar as enter by sendKeys in vba script

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.

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