.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SendStringToExecute brings up the text window 2012 64bit

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
432 Views, 6 Replies

SendStringToExecute brings up the text window 2012 64bit

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.

 

 

SendStringToExecute(

"-units" & vbCr & "2" & vbCr & "4" & vbCr & "1" & vbCr & "8" & vbCr & "" & vbCr & vbCr, False, False, False)

 

 

 

6 REPLIES 6
Message 2 of 7
Jeff_M
in reply to: Anonymous

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.....

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 7
Anonymous
in reply to: Anonymous

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.

 

thanks

Message 4 of 7
chiefbraincloud
in reply to: Anonymous

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.

Dave O.                                                                  Sig-Logos32.png
Message 5 of 7
jeff
in reply to: chiefbraincloud

As Jeff_M and Chief pointed out you can set them directly using properties of the Database class

 

 

Database.Lunits

Database.Luprec

Database.Aunits

etc....

 

 

At this Link at the bottom expand the System Variables '+' box and I think that covers all the properties

 

 

You can also find your answers @ TheSwamp
Message 6 of 7
Anonymous
in reply to: jeff

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.

 

Thanks

Message 7 of 7
chiefbraincloud
in reply to: Anonymous

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.

Dave O.                                                                  Sig-Logos32.png

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost