everytime i use the sendStringToExecute command it brings up the text window( F2 ). i have Echocomand set to false. Annoying for the most part, is there a setting somewhere to stop this from happening.
"-units" & vbCr & "2" & vbCr & "4" & vbCr & "1" & vbCr & "8" & vbCr & "" & vbCr & vbCr, False, False, False)
That command always brings up the text window since there is a lot of text to display for the user to respond to. Why use SendStringToExecute for this? Just set the appropriate Sysvars directly.....
That is what i have done. This old code, i am having to convert and the creator of the old stuff liked to see the actuall commands i guess. i just want to see if there was a setting besides graphscr.
I think the real point, as Jeff indicated, is that you are calling the command line version of the command, so autocad expects to be prompting the user, so it has to force the text screen to be shown so the user can see the prompts.
I had a hunch, and tested it, and I was correct. (I do agree that in 99% of circumstances, I would just set the properties directly instead of sending a command) But if you are forced to use SendString... You can send it as a lisp command. The string at the command line should be (vl-cmdf "-units" "2" "4" "1" "8" "" "") with a space or carriage return at the end. Then AutoCAD knows that it is in Automation mode, and does not force open the Textscreen.
The whole goal is to get it converted as quick as possible to limit the down time. Once it was up and running, i made it work better and written more productly.
Question do either of you guys know what how to read the current coordinate system? in VBA it was currentprojection. i have been looking and cannot find the calls for it.
Editor.CurrentUserCoordinateSystem will return a Matrix3d, but that would be comparable to the ActiveUCS property in VBA.
I searched my VBA reference for currentprojection, and I don't see it at all, so I can't tell if we're speaking the same language or not.