Jump to content

Recommended Posts

Posted

As my script resizes blocks, all the values remain the same size. If I explode a block then the tags are notably resized. Now I can get to the attribues using entnext or nentsel but I'm struggling to locate the values? Any help appreciated.

Posted

Not sure if this would work?

 

(defun c:test (/ ent scl Obj)
 (if (and  (setq ent (car (entsel "\nSelect Block: ")))
       (not (initget 7))
       (setq scl (getreal "\nEnter Scale Factor: "))) 
   (progn
     (setq Obj (vlax-ename->vla-object ent))
     (foreach Att (vlax-safearray->list
            (vlax-variant-value
              (vla-getAttributes Obj)))
   (vla-put-scaleFactor Att scl)))
   (princ "\n<!> Nothing Selected <!>"))
 (princ))

Posted

Thanks Lee,

 

This scales the width of the value, I think I can work from this.

Posted

This is better:

 

(defun c:test  ()
 (foreach att    (vlax-safearray->list
         (vlax-variant-value
           (vla-getAttributes
             (vlax-ename->vla-object
           (car
             (entsel))))))
   (vla-ScaleEntity att
     (vla-get-Insertionpoint att) 2.0))
 (princ))

 

Formatted only for a test, ammend it as necessary :)

Posted

Ta Lee!

 

I have four values that sattilite each block so all I needed to do was grab the insertion point of the block!

Posted
Ta Lee!

 

I have four values that sattilite each block so all I needed to do was grab the insertion point of the block!

 

Nice one John, happy I could 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...