PDA

View Full Version : Using Quotation marks in a string?


ReachAndre
2009-07-28, 04:21 PM
Hello all,
I am trying to use quotation marks in a string. does anyone know how I may do this?
I am trying to get the %en0 to be used in quotations and the oid to be used as a value.

Found it = \"



(defun c:dttl (/ sp1 att1v att2v att3v bname oid oidv)

(setq oid (rtos (vla-get-ObjectId (vlax-ename->vla-object (car (entsel "\n Select Source Object: ")))) 2 0))
(setq oidv (strcat "%<\\AcObjProp Object(%<\\_ObjId " oid ">%).StandardScale \f "%en0">% "))

(alert (strcat "ObjIdVal = " oidv))
(princ (strcat "ObjIdVal = " oidv))

(princ))

Thanks all,
Andre

RobertB
2009-07-28, 05:18 PM
That should be a backslash (\), not a forward slash (/), e.g.

(princ "\nThis is a sample \"quote\".")

rkmcswain
2009-07-28, 05:52 PM
..and of course another alternative, if the slashes and extra quote marks confuse you... ;-)


(princ (strcat "\nThis is a sample " (chr 34) "quote" (chr 34) "."))

tedg
2009-07-28, 06:57 PM
That should be a backslash (\), not a forward slash (/), e.g.

(princ "\nThis is a sample \"quote\".")

..and of course another alternative, if the slashes and extra quote marks confuse you... ;-)


(princ (strcat "\nThis is a sample " (chr 34) "quote" (chr 34) "."))

You guys need a hobby! :p
(just kidding... I'm always humbled when I read your posts)

RobertB
2009-07-28, 07:17 PM
You guys need a hobby! :p
(just kidding... I'm always humbled when I read your posts)This is our hobby. We are just sick.

tedg
2009-07-28, 07:26 PM
This is our hobby. We are just sick.
Some people collect stamps... you help solve the world's Autodesk problems.

:beer: