Registered forum members do not see this ad.
Hello,
I want to be able to Explode (or BURST) the Block.
And for the Block Attribute 'CAB_ID' to copy through to the Object Data Field 'CAB_ID' on the Polyline.
I used a program called POWER MAP, which was alright but still long winded, and a program called GeoTools, which is very powerful, but not quite what is needed.
Im sure this would be relatively simple for a Pro user.
Any help much appreciated.
Registered forum members do not see this ad.
I had a go and sort of got it to work, if you run the code line by line etc it works but via loading it does not really not sure what is going on. I think its in the ade_od command which is a Map function. So if any one wants to have a look I would appreciate it. You must have Lee-macs BurstUpgradedV1-3 lisp for it to work.
It may be a 2018 problem seems t0 work on 2013.
Code:; take a attribute and explode block and add it as a object id field ; credit to lee-mac for his burst routine ; lee's burst routine must be in a supported path ; By Alan H July 2017 (defun c:att-objid ( / obj pt pt1 pt2 ss1 ss2 txt ent) (setq oldsnap (getvar "osmode")) (setvar "osmode" 512) (setq obj (vlax-ename->vla-object (car (setq ent (entsel "PIck block pline edge"))))) (setq pt (cadr ent)) (foreach att (vlax-invoke obj 'getattributes) (if (= "CAB_ID" (strcase (vla-get-tagstring att))) (setq txt (vla-get-textstring att )) ) ) (if (not LM:Burst)(load "BurstUpgradedV1-3")) ; empty selection set and add 1 block (Setq SS1 (ssadd)) (setq ss1 (ssadd (car ent) ss1)) (lm:burst ss1) (setvar 'osmode 0) (setq pt1 (polar pt (/ pi 4) 30)) (setq pt2 (polar pt (* 1.25 pi) 30)) (setq lst (list pt1 pt2)) (setq ss2 (ssget "F" lst)) (setq ent (ssname ss2 0)) (ade_odsetfield ENT "CAB_INFO" "CAB_ID" 0 txt) (setvar 'osmode oldsnap) (princ "all done") ) (c:att-objid) ; (ade_odgetfield ENT "CAB_INFO" "CAB_ID" 0) ; check if worked or use properties
Last edited by BIGAL; 23rd Jul 2017 at 07:32 am.
A man who never made mistakes never made anything
Bookmarks