Jump to content

Recommended Posts

Posted

I am having a hard time trying to figure out in lisp to reset a block back its original scale of 1. I know how to do manually, just not how to do it in lisp.

 

Basically I have some blocks that were in paperspace, that I used the changespace command. The blocks have an annotative property being on.

 

Thanks for the direction, but  I am seeing a lot of re inserting the blocks back in.

 

Posted

Here is a quick and dirty on how to set block scales.

 

(defun c:BlockReset ()
  (setq ss (ssget ":s" '(( 0 . "INSERT"))))
  (if ss
    (progn
      (setq blk (vlax-ename->vla-object (ssname ss 0)))
      (vlax-put-property blk 'XEffectiveScaleFactor 1.0)
      (vlax-put-property blk 'YEffectiveScaleFactor 1.0)
      (vlax-put-property blk 'ZEffectiveScaleFactor 1.0)
      )
    )
  (princ)
  )

 

 

Posted

That's it! Thank you for the help.

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