Lee Mac Posted December 15, 2011 Posted December 15, 2011 getdist function would handle two options ( real and integer numbers ) instead of one like getreal function. Huh? getreal will accept any numerical input since any integer is also a real number. Quote
anaskattayil Posted July 17, 2014 Posted July 17, 2014 I need to explode the same block. I already used burst command, but its not exploding. please help me... Quote
Tharwat Posted July 17, 2014 Posted July 17, 2014 I need to explode the same block. I already used burst command, but its not exploding. please help me... Invoke the command block then roll down the block you want to explode then check the check toggle on the right side hand of the same dialog if it is checked or not . Quote
tuo_edisni Posted November 3, 2016 Posted November 3, 2016 This Lisp worked great, however, is it possible to add exceptions? for instance, if some of the blocks didnt have the height field filled in. As the lisp stands it produces an error when this occurs and no numbers are changed. Also is it possible to add more TAG names to the same lisp. Thanks for the great work. quick one: (defun c:ValAddSub (/ aDoc val Tag itm ss) (vl-load-com) (setq aDoc (vla-get-ActiveDocument (vlax-get-acad-object))) (setq Tag "H");<--- Your point height TAG name (cond ((and (setq Val (getreal "\n Enter Value to Add/Substract [Negative value to subtract]: ")) (ssget ":L" '((0 . "INSERT") (66 . 1)) ) (vlax-for itm (setq ss (vla-get-ActiveSelectionSet aDoc)) (if (and (setq itm (assoc (strcase tag) (mapcar (function (lambda (j) (list (vla-get-tagstring j) (vla-get-textstring j) j ) ) ) (vlax-invoke itm 'GetAttributes) ) ) ) )(progn (- (distof (vla-get-textstring (last itm))) val) (vla-put-textstring (last itm) (rtos (+ (distof (vla-get-textstring (last itm))) val) 2 2))) ) ) (vla-delete ss) ) ) ) ) Tharwats code: (if (and (eq (cdr (assoc 0 e)) "ATTRIB") (not (eq (atof (cdr (assoc 1 e))) 0.)) [color=blue] (eq (cdr (assoc 2 e)) "H") [/color] ) (entmod (subst (cons 1 (rtos (- (atof (cdr (assoc 1 e))) st) 2 [color=blue]2[/color])) (assoc 1 e) e) ) ) 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.