0 Members and 1 Guest are viewing this topic.
<snip> I see the potential for growth and want to learn. What would someone suggest for starters?
(vl-load-com)(defun jb:BlockLayerZero(nameStr newLayer / )(if (not (tblsearch "layer" newLayer))(alert (strcat newLayer " does not exist - please creat it first!"))(progn(if (tblsearch "block" nameStr)(progn(vlax-for x (vla-item (vla-get-blocks jbThisDrawing) nameStr)(vlax-put-property x 'layer "0")(vlax-put-property x 'color acByLayer)(princ "\nLayer changed!"))(vlax-for blks (vla-get-blocks jbThisDrawing)(vlax-for blk blks(if (vlax-property-available-p blk 'name)(if (=(vla-get-name blk) nameStr)(vla-put-layer blk newLayer))))))(alert (strcat NameStr " not found!")))))(princ))(COMMAND "LAYER" "M" "A-Lite-01")(defun c:FixLiteBlock( / )(jb:BlockLayerZero "AL2x4" "A-Lite-01"))
(vlax-for x (vla-Item (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-Acad-Object))) nameStr)
<trumped by the gurus>Don't mind me CECE_CAD.... cept for the welcome.
Quote from: Birdy on September 13, 2006, 06:12:27 PM<trumped by the gurus>Don't mind me CECE_CAD.... cept for the welcome. A BIG THANKS TO ALL!