Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Open .PC3 properties through lisp

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Nett0
1580 Views, 10 Replies

Open .PC3 properties through lisp

Hi everyone,

 

I'm trying create a LISP to customize PDF creation.  The lisp looks into the .PC3 file which paper size better fits the plot area. But its exaustive to every time i want to create a new paper size i have to open the .pc3 file and configure a new paper.

 

There is a way to open the .pc3 properties through lisp?

 

Thanks in advance

 

Netto

10 REPLIES 10
Message 2 of 11
hgasty1001
in reply to: Nett0

Hi,

 

It seems there is no way to read a .pc3 file with lisp and obtain useful information, I found some information and a .NET program here: CTB Viewer.

 

Gaston Nunez

Message 3 of 11
Nett0
in reply to: Nett0

 

Unfortunately I couldn't  open CTB Viewer. I'm not registered in http://www.theswamp.org and it looks like they are not accepting new members at the moment.

 

But I don't want to obtain useful information from a Pc3 file. I just want to open its properties, like the properties option in the plot command. 

 

Thanks anyway for your time  Gasty

Message 4 of 11
bhull1985
in reply to: Nett0

I believe it's

mark@theswamp.org

that you'd send an email to and he will give you an account.

as far as i remember he got back to me within an hr or two of me sending him that email

 

theswamp is a great place, it's probably worth sending the email to get an account there 🙂

 

And hey check out this portion of code, it may be of use for you. This is a defun that changes the ctb file of a dwg.

 

(defun c:mcp ()
 (vl-load-com)
  (vla-put-StyleSheet
    (vla-get-ActiveLayout
   (vla-get-ActiveDocument (vlax-get-acad-object))
    )
    "monochromeP.ctb"  ;;<--we still use CTB, yours would be hmc-std.stb
  )
)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 5 of 11
Nett0
in reply to: bhull1985

Thank you Bhull.

 

I've already sent an email to mark@theswamp.org. I hope he reply soon.

 

Thank you as well for your routine. It helps but I've already use a cod to set plot style.

 

Cheers

Message 6 of 11
dgorsman
in reply to: Nett0

Paper sizes don't change, so there's no real need to programmatically read a PC3 or anything special.  Just note the common sizes in use, write them down in an Excel file or whatever for future reference.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 7 of 11
Nett0
in reply to: dgorsman

 

I do not think I explained myself properly.

 

I Don't want to progammatically read a .PC3 file.  I just want to open its properties via lisp.

 

The thing is, every time that i want to create a new paper size in DWG To PDF.Pc3 file, I've to:

 

   Go to the path C:\Users\*user*\AppData\Roaming\Autodesk\AutoCAD 2013 - English\R19.0\enu\Plotters

 

   Open the DWG To PDF.pc3 file.

 

   Select Device and Documents Settings tab.

 
 
All I want is to do this directly from LISP. There is no real need on this. It's only to facilitate my work.
 
Thank you for your answer dgorsman

 

 

Message 8 of 11
bhull1985
in reply to: Nett0

Try looking into the "startapp" lisp function.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 9 of 11
dmfrazier
in reply to: bhull1985

As in:

(STARTAPP "pc3exe.exe" "MyPath/MyPrinter.PC3")

Message 10 of 11
dmfrazier
in reply to: Nett0

"The thing is, every time that i want to create a new paper size in DWG To PDF.Pc3 file, I've to:

 

Go to the path C:\Users\*user*\AppData\Roaming\Autodesk\AutoCAD 2013 - English\R19.0\enu\Plotters

 

Open the DWG To PDF.pc3 file."

 

Why not just click "Plotter Manager"?  Set the above path as your Printer Config Search Path, and it takes you right there.

Message 11 of 11
Nett0
in reply to: dmfrazier

 

I've tried to use the starapp funtion but with no success.

 

(STARTAPP "pc3exe.exe" "MyPath/MyPrinter.PC3") is what i was looking for.

 

Thank you Bhull for all your help.

 

Thak you dmfrazier for your soluction.

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost