Jump to content

Recommended Posts

Posted

I have drawings mainly in A1 in my office. We do however plot our drawings at A3 for reports etc. I have a dynamic block setup that i can select the scale of the drawing and the paper size e.g. 1:2500@A1. The thing I have discovered is that the guys create a copy of the vp and just change the dynamic block to the A3 with the corrected scale. I see this as a disaster. If they need to make changes to anything in Paper Space and forget to do it to the A3 or vice versa we could be wide open to discrepencies in drawings and thus claims.

 

Can a reactor be setup that when the plot settings are set for A1 or A3 using Page Setups that the scale would be adjusted to suit. I am trying to make this automatic to stop the guys making a mess.

 

Would appreciate any help on this!!

Posted

Sorry I'm having trouble understanding what you're trying to do:

Depending if the page setup is set to A1 or A3 you want to scale a specific block or change the plot scale? And how do you want to integrate the reactor?

If it's change the plot scale (on the active layout):

; Change plot scale based on papersize
(defun c:changeScale (/ actLay papSize)
 (setq actLay (vla-get-activelayout (vla-get-activedocument 
                                                  (vlax-get-acad-object)))
   papSize (vla-get-CanonicalMediaName actLay))
 (Cond ((eq papSize "A1")
    (vla-put-StandardScale actLay acVpCustomScale)
    (vla-setcustomscale actLay 1 2500)
    )
   ((eq papSize "A3")
    (vla-put-StandardScale actLay acVpCustomScale)
    (vla-setcustomscale actLay 1 1250)
    )
   )
 )

Posted (edited)

And put inside Alan's (modified) Plot Reactor program:

;;; ------------------------------------------------------------------------
;;;    PlotSheetScaleReactor.lsp v1.0
;;;    (PlotSheetCountReactor modified by SK)
;;;
;;;    Copyright© 10.02.09
;;;    Alan J. Thompson (alanjt)
;;;    alanjt
;;;
;;;    Permission to use, copy, modify, and distribute this software
;;;    for any purpose and without fee is hereby granted, provided
;;;    that the above copyright notice appears in all copies and
;;;    that both that copyright notice and the limited warranty and
;;;    restricted rights notice below appear in all supporting
;;;    documentation.
;;;
;;;    The following program(s) are provided "as is" and with all faults.
;;;    Alan J. Thompson DOES NOT warrant that the operation of the program(s)
;;;    will be uninterrupted and/or error free.
;;;
;;;
;;;    Revision History:
;;;
;;; ------------------------------------------------------------------------

(vl-load-com)

;; activate reactor
(or PlotSheetScale:Reactor
   (setq PlotSheetScale:Reactor
          (vlr-command-reactor
            nil
            '((:vlr-commandWillStart . PlotSheetScale:Procedure)
             )
          ) ;_ vlr-command-reactor
   ) ;_ setq
) ;_ or

;; procedure
(defun PlotSheetScale:Procedure (#Call #Info / actLay papSize)
 (cond
   ((wcmatch (strcase (car #Info)) "*PLOT*")
    (setq actLay (vla-get-activelayout (vla-get-activedocument
                     (vlax-get-acad-object)))
      papSize (vla-get-CanonicalMediaName actLay))
    (Cond ((eq papSize "A1")
       (vla-put-StandardScale actLay acVpCustomScale)
       (vla-setcustomscale actLay 1 2500)
       )
      ((eq papSize "A3")
       (vla-put-StandardScale actLay acVpCustomScale)
       (vla-setcustomscale actLay 1 1250)
       )
      )
    )
 ) ;_ cond
) ;_ defun

Edited by SLW210
Posted

I'll try to explain a bit better. What I am trying to do is kind of the reverse of what you are say. Basically I have an A1 template setup for drawings as that is the size we mostly use for our drawings. I have a page setup setup for plotting to our plotter for the A1. This is all fine. But the problem arises when we need to plot a drawing to A3 for the back of a report or something like that. What the guys have been doing here a lot lately until I found out was to copy the layout and add A3 to end of the layout name. They would then chnage the scale of a dynamic block that I have created, which is linked to a scale bar, to read A3. The page setup they would use would then be the A1 to A3 settings. The problem with this is that they are duplicating the drawing and so if a change has to be made it will surely be missed in a few of the duplicated layouts.

 

Anyway, what i am after is a plot reactor that will allow one layout to be used. If someone wants to plot it at A3 then they select the A1 to A3 page setup and this would change the plot scale to 1:2. I then want that to change the visilibility state of the dynamic scale block ro reflect this.

 

Sounds complicated i know.....

Posted

LoL

I think you've removed everything that makes up the PlotSheetCountReactor. You can remove all my information from it. :)

Posted
LoL

I think you've removed everything that makes up the PlotSheetCountReactor. You can remove all my information from it. :)

Still, I copied your work so I thought I'd keep it all in there :)

 

I'll try to explain a bit better. What I am trying to do is kind of the reverse of what you are say. Basically I have an A1 template setup for drawings as that is the size we mostly use for our drawings. I have a page setup setup for plotting to our plotter for the A1. This is all fine. But the problem arises when we need to plot a drawing to A3 for the back of a report or something like that. What the guys have been doing here a lot lately until I found out was to copy the layout and add A3 to end of the layout name. They would then chnage the scale of a dynamic block that I have created, which is linked to a scale bar, to read A3. The page setup they would use would then be the A1 to A3 settings. The problem with this is that they are duplicating the drawing and so if a change has to be made it will surely be missed in a few of the duplicated layouts.

 

Anyway, what i am after is a plot reactor that will allow one layout to be used. If someone wants to plot it at A3 then they select the A1 to A3 page setup and this would change the plot scale to 1:2. I then want that to change the visilibility state of the dynamic scale block ro reflect this.

 

Sounds complicated i know.....

Sorry woodman I'm trying to think of the lisp you want in a step by step form (cause that's what code is):

  1. When someone goes to plot you want a reactor to call a lisp.
  2. This lisp will check whether the page setup is A1 or A3?
  3. It will then change the plot scale to 1:2 for A3, and ?? for A1?
  4. It will also scale a dynamic block (in which case I'd need the block name etc - I know how to scale a block but I'm not sure how to scale a dynamic block - this might be over my head, others feel free to chip in).

Is this close to what you want? In which case I've attempted to do 1-3 for you in the last post, it's just the block scale I haven't done.

Posted
Still, I copied your work so I thought I'd keep it all in there :)

 

No sweat, I appreciate that.

Posted

SteveK,

I hope i can make myself understood so please bear with me. We have a large format HP plotter for A1 drawings. Most of our drawings are created in A1 format as that is the mostly likely format for printing.

We also have a HP A3/A4 laser printer. I have different page setups created for the printer and the plotter. If you select the A1 then it sets all the print settings for the the large format plotter to print at A1 so the plot scale is set to 1 etc. If you select the page setup for printing the drawing at A3 ( as we frequently do for reports etc.) then all those setting are set like plot scale of 1:2 etc.

 

What I was hoping to do is get a reactor that detects that I have selected the sheet to be plotted on either the A1 or A3 and set a dynamic block to indicate A1 or A3. But also that it could take the scale like 1:500 and if the plot scale is 1:2 then half the scale in the dynamic block to 1:250.

 

I hope this explains....

Thanks.

Posted
SteveK,

I hope i can make myself understood so please bear with me. We have a large format HP plotter for A1 drawings. Most of our drawings are created in A1 format as that is the mostly likely format for printing.

We also have a HP A3/A4 laser printer. I have different page setups created for the printer and the plotter. If you select the A1 then it sets all the print settings for the the large format plotter to print at A1 so the plot scale is set to 1 etc. If you select the page setup for printing the drawing at A3 ( as we frequently do for reports etc.) then all those setting are set like plot scale of 1:2 etc.

 

What I was hoping to do is get a reactor that detects that I have selected the sheet to be plotted on either the A1 or A3 and set a dynamic block to indicate A1 or A3. But also that it could take the scale like 1:500 and if the plot scale is 1:2 then half the scale in the dynamic block to 1:250.

 

I hope this explains....

Thanks.

To do what I think you need I need that dynamic block you are talking about because the block will contain the info to scale it and the tag where you want to display "A1" or "A3".

steve

Posted

Steve,

This is the dynamic block i use for the scale at the moment. It displays a scale bar depending on the scale selected. If this need to be broken up and that is ok too. Will the scale be linked to the viewport scale?

 

Let me know if i need to modify the block to get it to work.

 

Thanks

Scale A1 New Sheet.dwg

Posted

I'm sorry we don't seem to be getting anywhere. The drawing you've attached must be suited only to civil 3D cause all I see is one text that reads "custom" though I find 474 objects in the drawing.

Posted

Steve,

I don't mean to waste your time.

I created in on Map 3D and have run it on several versions of CAD and no problem. Were you able to see the grip for the dynamic block? It's wierd if you weren't.

Could you create a block with just a tag as you said and I could use that one???

 

Thanks.

Posted

As I said earlier I can scale a block but I'm not sure how to adjust a dynamic block at a grip (even if I could see your block). This isn't what you're after but maybe it'll make setting the Paper Size attribute easier.

(defun c:PSize (/ en actLay papSize)
 (vl-load-com)
 (Cond ((not (setq en (car(nentsel))))
    (princ "\nNothing Selected."))
   ((not (eq (cdr (assoc 0 (entget en))) "ATTRIB"))
    (princ "\nSelection not an Attribute"))
   (T
    (setq actLay (vla-get-activelayout (vla-get-activedocument 
                                                  (vlax-get-acad-object)))
          papSize (vla-get-CanonicalMediaName actLay))
    (vla-put-textstring (vlax-ename->vla-object en) papSize)
    )
   );_ cond
 (princ)
 )

Hopefully someone else can help you.

Posted

I got this to work.. Not using a reactor but using fields. It is now setup so that when you select to plot to either A1 or A3 the Sheet Size and Scale will update on Regenall. The scale is a formula combination based on Viewportscale and Plotscale to be correct what ever paper size is chosen.

 

I have also setup a scale bar to sclae to 100mm on A1 or 50mm on A3. I would have liked to have the scale bar referenced back to the scale but I was unable to do it so far. Will have another go though.

 

Thanks for your help anyway..:)

template Cadtutor.dwg

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