passing a quote string into a string variable

passing a quote string into a string variable

Anonymous
Not applicable
1,196 Views
6 Replies
Message 1 of 7

passing a quote string into a string variable

Anonymous
Not applicable

I'm trying to get a string  11" x 17" into a string variable.     If I use (setq D "11" x 17"") or (setq D "11\" x 17\"")  doesn't work.    I'm trying to set D so that I can do a !D in a script.

0 Likes
Accepted solutions (1)
1,197 Views
6 Replies
Replies (6)
Message 2 of 7

Shneuph
Collaborator
Collaborator

I think you are doing it correctly.  How do you need to use D later?

 

Command: (Setq D "11\"x17\"")
"11\"x17\""

Command: (command "-mtext" pause "w" 0 d "")

 

EDIT:

Maybe you need to use

(princ D)(princ)

??

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
0 Likes
Message 3 of 7

paullimapa
Mentor
Mentor

maybe try this:

(setq D "\"11\" x 17\"\"") 

 

 

Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator
Layer Apps | List on Steroids | VP Zoom Scales | Exchange App Store


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 7

Anonymous
Not applicable

Yes, the (princ D) (princ)  does evaluate and sends the proper string to the command line.

However,   I'm trying to use !D in the script I'm running.   I have used this mechanism !papersize on other strings into scripts. 

 

 

-plot
yes
Model
Laser1.pc3
!D<<<<<<<<<<<<<<<<<<<<<<<<<<<<problem.   Note that !C works.
Inches
Landscape
YES
Limits
!C
CENTER
Yes
01B-W.ctb
Yes
No
No
No
Yes

 

(setq D "\"11\" x 17\"\"") suggested by another doesn't work either.

0 Likes
Message 5 of 7

paullimapa
Mentor
Mentor

You may want to double check by looking in the Plot window for Plot device Laser1.pc3 under Paper Size drop down list to see if the size is actually listed as 11" x 17" or maybe 11"x17" without the spaces or maybe even 11"x17" inches or even 11x17.  AutoCAD is very particular when it comes to getting the exact matching paper size name for the specified plot device.

 

 

Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator
Layer Apps | List on Steroids | VP Zoom Scales | Exchange App Store


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 6 of 7

Shneuph
Collaborator
Collaborator

Yes.. I set my model space page size to letter 8.5x11 then pasted this in the command line:

 

-PLOT
y  (detailed config)


!D  = "11\" x 17\""

 

 

 

 

 

y  (save plot config)
n (proceed w/ plot)

 

It changed the page size from letter to 11x17.  If the name of your page size is indeed exactly 11" x 17" it should work.

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
0 Likes
Message 7 of 7

Anonymous
Not applicable
Accepted solution

"11\" x 17\""   got it.   The echo to the screen when the script ran kinda thru me off.   Most observant when you suggested the format of the papersize.   We have four different brands of printers and 3 of the 4 have different B size sheet names. 

 

Appreciate both suggestion and comments.


 


 

0 Likes