Johntosh Posted April 3, 2009 Posted April 3, 2009 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. Quote
Lee Mac Posted April 3, 2009 Posted April 3, 2009 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)) Quote
Johntosh Posted April 3, 2009 Author Posted April 3, 2009 Thanks Lee, This scales the width of the value, I think I can work from this. Quote
Lee Mac Posted April 3, 2009 Posted April 3, 2009 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 Quote
Johntosh Posted April 3, 2009 Author Posted April 3, 2009 Ta Lee! I have four values that sattilite each block so all I needed to do was grab the insertion point of the block! Quote
Lee Mac Posted April 3, 2009 Posted April 3, 2009 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 Quote
Recommended Posts
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.