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

Scale PDF on X & Y independently?

3 REPLIES 3
Reply
Message 1 of 4
mid-awe
1731 Views, 3 Replies

Scale PDF on X & Y independently?

Hi all,

 

I'm looking for information on issue that has become the bane of our office. We recieve many PDF files that need to be redrawn everyday due to bad scale as if they were scanned on a copy machine and sent to us. For example on drawing may need to scale down by 10% on the Y axis and scaled down by 30% on the X axis. If it were only a few, then no big deal, but it isn't. I know that we can use GIMP to scale these PDFs on independent X & Y axis, but I am really hoping that someone here can suggest how it may be done in AutoCAD. (Also, I read, in another thread on another forum, a suggestion to make the attached PDF into a block without uniform scale, but that does not seem to work or maybe I misunderstood).

 

Thank you in advance for any help / suggestions.

3 REPLIES 3
Message 2 of 4
hmsilva
in reply to: mid-awe


@mid-awe wrote:

Hi all,

 

I'm looking for information on issue that has become the bane of our office. We recieve many PDF files that need to be redrawn everyday due to bad scale as if they were scanned on a copy machine and sent to us. For example on drawing may need to scale down by 10% on the Y axis and scaled down by 30% on the X axis. If it were only a few, then no big deal, but it isn't. I know that we can use GIMP to scale these PDFs on independent X & Y axis, but I am really hoping that someone here can suggest how it may be done in AutoCAD. (Also, I read, in another thread on another forum, a suggestion to make the attached PDF into a block without uniform scale, but that does not seem to work or maybe I misunderstood).

 

Thank you in advance for any help / suggestions.


Hi mid-awe,

when I need to scale an image or a .pdf, that is the method I use.

After turn the .pdf in a block without uniform scale you can use the object properties to apply different scales in x, y or z, or create a routine to apply different scales to the "INSERT" object...

Only as a demo and a starting point...

 

(defun c:demo (/ adoc hnd lay nsel obj objn ss)
  (vl-load-com)
  (if (setq ss (ssget "_+.:E:S:L" '((0 . "INSERT"))))
    (progn
      (setq adoc (vla-get-activedocument (vlax-get-acad-object))
	    hnd	 (ssname ss 0)
	    obj	 (vlax-ename->vla-object hnd)
	    objn (vla-get-Effectivename obj)
      )
      (vlax-for	blk (vla-get-blocks adoc)
	(if (eq objn (vla-get-Name blk))
	  (if (= (vlax-get blk 'BlockScaling) 0)
	    (progn
	      (vla-put-xscalefactor obj 1.5)
	      (vla-put-yscalefactor obj 2.5)
	    )
	  )
	)
      )
      (vla-regen adoc acallviewports)
    )
  )
  (princ)
)

 

 

Henrique

EESignature

Message 3 of 4
mid-awe
in reply to: mid-awe

Thank you Henrique. I will give this a test asap 🙂
Message 4 of 4
hmsilva
in reply to: mid-awe

You're welcome, mid-awe

Henrique

EESignature

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

Post to forums  

Autodesk Design & Make Report

”Boost