objDoc.SendCommand failure

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We have some VB6 code to interact with AutoCAD and other custom dlls. Please note our code does work with previous version of AutoCAD.
The code for the command “objDoc.SendCommand(chr$(27) & chr$(27))” gives our program the error “AutoCAD:[NUMBER]-Invalid Input.”
The error is rather fickle as the command works perfectly in other areas of our methods. This leads me to believe the error is state based. The state is probably a running configuration where AutoCAD rejects the *cancel* command. The following are the AutoCAD commands leading into the error.
Commands leading to opening of our own document (works fine): Customization file loaded successfully. Customization Group: ACAD
- Customization file loaded successfully. Customization Group: CUSTOM
- Customization file loaded successfully. Customization Group: PLANNINGANALYSIS
- Customization file loaded successfully. Customization Group: MAINTENANCE
- Customization file loaded successfully. Customization Group: 2DDRAFTING
- Customization file loaded successfully. Customization Group: HELP
- Customization file loaded successfully. Customization Group: INDUSTRYMODELTOOLS
- Customization file loaded successfully. Customization Group: MAPELECTRIC
- Customization file loaded successfully. Customization Group: AUTODESKSEEK
- Customization file loaded successfully. Customization Group: MODELDOC
- Customization file loaded successfully. Customization Group: CONTENTEXPLORER
- Customization file loaded successfully. Customization Group: EXPRESS
- Customization file loaded successfully. Customization Group: BIM360
- Customization file loaded successfully. Customization Group: APPMANAGER
- Customization file loaded successfully. Customization Group: FEATUREDAPPS
- Customization file loaded successfully. Customization Group: SKETCHUPIMPORTSKP
- ...
- There are no valid MS Jet providers installed......Done.
- Regenerating model.
- *Cancel*
- Initializing [CUSTOM DLL]
- DLL Path:<[CUSTOM DLL]
- AutoCAD menu utilities loaded.*Cancel*
- Command: *Cancel*
- _RIBBON
- *Cancel*
- COMMANDLINE
- [CUSTOM METHOD]
- Command:
- Command:
- Command:
- Command: [CUSTOM METHOD OUTPUT]
- Command:
- Command: [CUSTOM METHOD]
- [CUSTOM METHOD OUTPUT]
- Command:
Commands run for our opened document:
- Opening an AutoCAD 2013 format file.
- Substituting [simplex.shx] for [HELVH.SHX].
- Substituting [simplex.shx] for [Cochin].
- Regenerating model.
- AutoCAD menu utilities loaded.
- Command:
- Autodesk DWG. This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application.
- Command:
- Command:
Thank you for any help you may provide.