ghsotwriter Posted April 16, 2018 Share Posted April 16, 2018 I was given a template with blocks. One of the block has an attribute with a text value (text value is in separate layer from the geometry) I would like to copy the values of Attribute A to the Attribute B, all inside the same block. Is there a way to do this in a more automatic way? Thanks! Quote Link to comment Share on other sites More sharing options...
pendean Posted April 16, 2018 Share Posted April 16, 2018 The second attribute needs to be a FIELD Quote Link to comment Share on other sites More sharing options...
ghsotwriter Posted April 16, 2018 Author Share Posted April 16, 2018 I was given a template with blocks. One of the block has an attribute with a text value (text value is in separate layer from the geometry) I would like to copy the values of Attribute A to the Attribute B, all inside the same block. Is there a way to do this in a more automatic way? Thanks! I mistyped. My last sentence i meant to copy the values of Attribute B to the Attribute A, all inside the same block. Thanks for the quick reply pendean! Quote Link to comment Share on other sites More sharing options...
pendean Posted April 16, 2018 Share Posted April 16, 2018 Not sure my answer would change even with the new info: are your attributes tags unique from each other, or did you simply copy the first for the second location? posting sample dwg files might help others help you. Let us know. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 17, 2018 Share Posted April 17, 2018 Like pendean a common asked for is to do Revision updates where the revision is bumped in a block containg multipe rows of attributes. A simple way is knowing the attribute order of creation and using the att number rather than tag names, cut att 3 and paste into att 6. Something like this ; Change attribute value by created position ; by Alan H (vl-load-com) (setq y 1) (setq ss1 (car (entsel))) (setq bname (vla-get-name(vlax-ename->vla-object SS1))) (setq x (getint "\nEnter line no to pick")) ; change this line in block (SETQ newstrblank ".") (foreach att (vlax-invoke (vlax-ename->vla-object SS1) 'getattributes) (if (= y x) (progn (setq newstr (vla-get-textstring att )) (vla-put-textstring att newstrblank) ) ) (setq y (+ Y 1)) ) (setq y 1) (setq x (getint "\nEnter line no to move to")) (foreach att (vlax-invoke (vlax-ename->vla-object SS1) 'getattributes) (if (= y x) (vla-put-textstring att newstr) ) (setq y (+ Y 1)) ) (princ) Quote Link to comment Share on other sites More sharing options...
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.