Results 1 to 6 of 6

Thread: Showing Quotation marks as Inch sign "

  1. #1
    Member
    Join Date
    2002-01
    Location
    CNY
    Posts
    27
    Login to Give a bone
    0

    Default Showing Quotation marks as Inch sign "

    Our new printer paper size is Ledger (11 x 17''), the problem is using inch marks in our plot lisp program, I found this routine but it returns a \" as a result.

    (setq qumark "\042")

    this is suppose to return the octal 042 which is the quotation mark.

    We just need to insert that inch mark after the 17 for the program to work.

    any ideas would be appreciated.

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Showing Quotation marks as Inch sign "

    Code:
    (setq me "Ledger (11 x 17\")")
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  3. #3
    Member
    Join Date
    2002-01
    Location
    CNY
    Posts
    27
    Login to Give a bone
    0

    Default Re: Showing Quotation marks as Inch sign "

    when i use this i get "Ledger (11 x 17\")" as a result, how do we get rid of the backslash?

  4. #4
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Showing Quotation marks as Inch sign "

    It depends on what you use to show the string on the command line / save it to a file. E.g. if you use prin1 / print it's going to show the whole thing including the \. But if you use princ it's not. The print / prin1 is mostly used when saving to a file so the file can later be used with read to get an exact duplicate of what the string was previously. From what you show, you probably used the print function. Try changing it to princ. You may have to add a (princ "\n") to have the same effect as print, by doing a new-line before the string.

    Also note there's vl-princ-to-string and vl-prin1-to-string which does nearly the same thing, except it saves this value to a string variable instead of printing on the command line / saving to a file.
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  5. #5
    AUGI Addict alanjt's Avatar
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Showing Quotation marks as Inch sign "

    This may also be of use:

    eg. (chr 34) -> "\""

    Civil 3D 2017 ~ Windohz 7
    Dropbox

  6. #6
    I could stop if I wanted to
    Join Date
    2007-05
    Location
    Brookfield WI
    Posts
    331
    Login to Give a bone
    0

    Default Re: Showing Quotation marks as Inch sign "

    this code creates MTEXT that displays like this

    12" x 3"
    TRENCH DUCT
    WITH MINIMUM 2 DIVIDERS

    (setq dctxt1 "12\" x 3\"\\PTRENCH DUCT\\PWITH MINIMUM 2\ DIVIDERS")

    \\P creates text on next line...maybe this helps you
    Last edited by d_m_hopper; 2010-07-14 at 02:41 PM.

Similar Threads

  1. Inch Marks option
    By Wish List System in forum AutoCAD Wish List
    Replies: 10
    Last Post: 2014-10-22, 06:42 PM
  2. Inch marks appear different
    By Eric Stewart in forum Revit Architecture - General
    Replies: 2
    Last Post: 2010-01-19, 08:53 PM
  3. Getting rid of inch and feet marks
    By Baldwin_4-6-0 in forum Revit Architecture - General
    Replies: 2
    Last Post: 2009-11-30, 02:54 PM
  4. Using Quotation marks in a string?
    By ReachAndre in forum AutoLISP
    Replies: 5
    Last Post: 2009-07-28, 06:26 PM
  5. The almighty quotation marks
    By jcostello.159947 in forum AutoCAD Tips & Tricks
    Replies: 1
    Last Post: 2008-02-09, 06:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •