Jump to content

Recommended Posts

Posted

(defun c:A4 ()
 (COMMAND "-PLOT" "Y" " " "PRINTER + COPIER" "A4" "M" "LANDSCAPE" "N" "E" "fit" "center" "Y" "monochrome.ctb" "N" "W" "n" "n" "y" "zoom" "e" "qsave")
)

 

When I type "A4" in command prompt automatically print will go.

 

Above "PRINTER + COPIER" is the printer name. But that is changed to "\\dc\utax_csd".

 

I replaced the same text in above. but, because of the single back slash ("\") it is not working.

i mean when iam using this string in lisp the single back slash ("\") is disappearing and it giving new string as "\\dcuutax_csd"..

 

Finally error is coming with Printer name not matching.

 

How i can overcome this one.....Can any one help me...

Posted

A bit more you can have the same problem with directory names the \\ implies a single \ to be used, so \\\\ would be two \\ thanks to those who helped previously.

Posted
Use

 

"\\\\dc\\utax_csd"

 

 

Thanks Mr lee

 

But i tried to keep like this but this also not working.

 

If i keep two Back slashes ("\\") the out put will come as same,

if i keep three one is reducing,

if i keep single it vanishing.

Posted
Use
"\\\\dc\\utax_csd"

 

X2

 

Should work with no problem. unless you mispelled the printer name

Posted

In my opinion, a more reliable solution is to create a PC3 setup file for that printer and use it to address the device in your code. That way, when the printer is changed, you will have to modify only one thing.

 

Regards,

Mircea

Posted

in that case:

This will give you a list of the PC3 names

 

(vl-directory-files
      (vla-get-PrinterConfigPath
            (vla-get-files
                  (vla-get-preferences (vlax-get-acad-object))))
      "*.pc3"
      1)

Posted

I am going like this...

 

(setq def_printer_name (vla-get-defaultoutputdevice (vla-get-output (vla-Get-Preferences (vlax-get-acad-object)))))

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