Jump to content

Only wanting to answer part of the command?


Recommended Posts

Guest looseLISPSsinkSHIPS
Posted

Hi,

 

Such is our situation at work that we need to set the following variable at start up

 

(command "-dwgunits" "3" "2" "4" "N" "Y" "N" "N")

 

Problem though is if we launch this within AutoCAD’s Acad2009.lsp at start-up (which we want, we want too set the scales to match from the beginning) we keep an open TEXT WINDOW BOX because the last 2 functions “N” “N”) are regarded as unknown command options by AutoCAD.

 

In short we don’t want to do anything with the commands entire list except for the part that requests “Scale objects from other drawings upon insert? [Yes/No] :” which I want too set to yes I would then like to ignore the facarde of adjoining questions the command ploughs through untouched.

 

Is there a way that I can just set this part without scrolling through the rest of the questions this (-dwgunits) command prompts me?

 

Thanks-

Posted

If I have time later there may be a system variable to use ILO your command.

Often you can cancel the command & previous responses are retailed.

 

Try this:

(command "-dwgunits" "3" "2" "4" "N" "Y") (command)

Posted

Using:

 

(COMMAND "-dwgunits" "3" "2" "4" "Y" "")

I get the following in the Text Window:

 

 Command: (COMMAND "-dwgunits" "3" "2" "4" "Y" "")
-dwgunits
Drawing units:
 1. Inches
 2. Feet
 3. Millimeters
 4. Centimeters
 5. Decimeters
 6. Meters
Unit for length <3>: 3
Drawing unit display formats:
 1. Scientific
 2. Decimal
Linear display format <2>: 2
Linear display precision <4>: 4
Scale objects from other drawings upon insert? [Yes/No] <Yes>: Y
Match INSUNITS to drawing units? [Yes/No] <Yes>:
Command: nil

The double-quotes at the end just accept the default answer for the " Match INSUNITS to drawing units?" question, then the script ends.

 

Will this work for you, or are you also refering to the warning message that appears when you run this command on a drawing for the first time?

 

Steve

Posted

This should cover the set up you are trying to do.

(setvar "MEASUREMENT" 1) ; metric drawing
(setvar "Lunits" 3) ; Leaner Units - Decimal
(setvar "luprec" 4 )  ; decimal places displayed for linear
(setvar "insunits"  3)   ;  block insert units Millimeters {Will Scale},  0=unitless {Will not Scale}
(setvar "aunits"    0 )  ; Angle Units  0 = degrees 4 = survey
(setvar "auprec"   4 )  ; decimal places displayed for angles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...