Jump to content

Printing Lisp for previous plot, Window selection and Preview needed.


Saqib_theleo

Recommended Posts

Hello all there,

I tried Macro buttons but could not get what I wanted. Now I am looking for a lisp which can auto select print previous plot and asks for window select 2 points, then shows preview and then print. I hope some one can make this simple Lisp.

Thanks.

Edited by Saqib_theleo
Link to comment
Share on other sites

(defun c:ppp ()   (command "-plot" "no" "" "previous plot" "" "" "y" "n")   (command "preview")   (princ) )

I found this one but don't know where to put window selection mode?

Link to comment
Share on other sites

  • 1 year later...

Hello everyone,

Can someone make a Plot Lisp from these commands.

I need to select windows,preview and then print.

Manual commands...

 

Command: -plot

Detailed plot configuration? [Yes/No] : y

 

Enter a layout name or [?] :

Enter an output device name or [?] :

Enter paper size or [?] :

Enter paper units [inches/Millimeters] :

Enter drawing orientation [Portrait/Landscape] :

Plot upside down? [Yes/No] :

Enter plot area [Display/Extents/Limits/View/Window] :

Enter lower left corner of window : Enter upper right

corner of window : Enter plot scale (Plotted

Inches=Drawing Units) or [Fit] :

Enter plot offset (x,y) or

:

Plot with plot styles? [Yes/No] :

Enter plot style table name or [?] (enter . for none) :

Plot with lineweights? [Yes/No] :

Enter shade plot setting [As displayed/Wireframe/Hidden/Visual styles/Rendered]

:

Write the plot to a file [Yes/No] :

Save changes to page setup [Yes/No]? y

Proceed with plot [Yes/No] :

Effective plotting area: 11.34 wide by 8.02 high

 

Plotting viewport 2.

 

If someone can make this Lisp I'll be thankful.

Thanks.

Link to comment
Share on other sites

There are lots of examples here to do plots using lisp, we have multiple setups so just pick the correct printer from a menu which has all the correct options built in and out they come. Not sure about the preview 1st pretty sure this question was asked very recently.

 

Here is an example http://www.cadtutor.net/forum/showthread.php?69132-Printing-LISP-Help...&highlight=Printing-LISP

Link to comment
Share on other sites

Hi Bigal,

Thanks for your reply, I have checked that link you told. But this is not working as I want.

If 1st preview is not possible then it is no problem.

Is this possible to make Lisp from these commands I copied from CAD.

Thanks.

Link to comment
Share on other sites

My question is why use "previous plot" are you not using the same printer all the time ? Or is the problem that your drawings are all over the place with no drafting standards. I have some help correcting that also.

Link to comment
Share on other sites

Hi Bigal,

Thanks for reply.

All drawings were first printed with other printer and were saved with these settings by "Apply to Layout" button. Now I want to print these drawings as PDF with Nitro PDF Creator with all previous settings (which were applied to first PDF print) except a little changing in Plot area by selecting with "Window select" option.

 

Thanks.

Link to comment
Share on other sites

This should suit your needs:

(defun c:prprev ( / firstCorner otherCorner)
  (if (setq firstCorner (getpoint "\n Specify first corner: "))
   (if (setq otherCorner (getcorner firstCorner "\n Specify opposite corner: "))
     (command "-plot" "yes" "Model" "Nitro PDF Creator (Pro 9)" "A4 Rotated" "Inches" "Landscape" "No" "Window" firstCorner otherCorner "Fit" "Center" "No" "" "Yes" "As displayed" "n" "y" "y")
     (princ "\n Invalid Input. Command Cancelled")
 )
    (princ "\n Invalid Input. Command Cancelled")
    )
 
 )

Link to comment
Share on other sites

If you want to plot all layouts but a new window setting for say a different title block then just simply edit the link to the code I posted "-6,-6" & "807,560" and save as the name of the new title block then its ready to go next time.

Link to comment
Share on other sites

Hello Commandobill,

The code is working as I need. Thanks for your time and help.

Now I can select new window for every drawing, is there any possibility to see preview before printing.

Thanks again.

GBY.

Link to comment
Share on other sites

I tested this once with success, but any time there is user input required that isn't controlled by lisp, it can be touchy...

 

(defun c:prprev ( / firstCorner otherCorner)
  (if (setq firstCorner (getpoint "\n Specify first corner: "))
   (if (setq otherCorner (getcorner firstCorner "\n Specify opposite corner: "))
     (progn
     (command "-plot" "yes" "Model" "Nitro PDF Creator (Pro 9)" "A4 Rotated" "Inches" "Landscape" "No" "Window" firstCorner otherCorner "Fit" "Center" "No" "" "Yes" "As displayed" "n" "y" "n")
     (command "preview")
     (command "-plot" "yes" "Model" "Nitro PDF Creator (Pro 9)" "A4 Rotated" "Inches" "Landscape" "No" "Window" firstCorner otherCorner "Fit" "Center" "No" "" "Yes" "As displayed" "n" "y" "y")
     )
     (princ "\n Invalid Input. Command Cancelled")
 )
    (princ "\n Invalid Input. Command Cancelled")
    )
 
 )

Link to comment
Share on other sites

Hello Commandobill,

It shows preview first but if you take print from preview by right clicking, after print it takes print again for the 2nd time. So you have to hit escape when you see preview. Not big issue.

Thanks.

Link to comment
Share on other sites

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