Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/14/2022 in all areas

  1. But you can learn and are more likely to get better help if you show that you want to learn rather than asking for a complete solution every time,
    3 points
  2. If you have lines, change before all lines in polylines (PEDIT Multiple), you can try this... PATH_LENGTH.lsp
    2 points
  3. Should stream line the code. ;;----------------------------------------------------------------------;; ;; SET ALL ENTITYS COLOR TO BYBLOCK (defun C:ALL-BlkByBlock (/ colBlockReference ActDoc dprSelection objSelection strBlockName) (setq Drawing (vla-get-ActiveDocument (vlax-get-Acad-Object))) (vla-StartUndoMark Drawing) (if (setq sel (ssget "_X" '((0 . "INSERT") (410 . "Model")))) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (setq obj (vlax-ename->vla-object ent)) (vlax-for objBlock (vla-item (vla-get-blocks Drawing) (vla-get-name obj)) (vla-put-Color objBlock 0) ) ) ) (vla-Regen Drawing acAllViewports) (vla-EndUndoMark Drawing) (princ) )
    1 point
  4. Try ; Written By: Peter Jamtgaard 12/20/2006 ;^P(or C:BlkByBlock (load "BlkByBlock.lsp"));BlkByBlock (defun C:BlkByBlock (/ colBlockReference ActDoc dprSelection objSelection strBlockName ) (if (setq dprSelection (entsel "\nSelect Block: ")) (progn (setq ActDoc (vla-get-ActiveDocument (vlax-get-Acad-Object)) dprSelection (car dprSelection) objSelection (vlax-ename->vla-object dprSelection) ) (vla-StartUndoMark ActDoc) (BlkByBlock objSelection) (entupd dprSelection) (vla-EndUndoMark ActDoc) ) ) (prin1) ) (defun BlkByBlock (objSelection / colBlockReference objBlock strBlockName ) (if (= (type objSelection) 'ENAME) (setq objSelection (vlax-ename->vla-object objSelection))) (if (wcmatch (strcase (vla-get-objectname objSelection)) "*BLOCK*") (progn (vlax-for objBlock (vla-item (vla-get-blocks ActDoc) (vla-get-name objSelection) ) (vla-put-Color objBlock 0) ; (vla-put-Layer objBlock "0") ; (vla-put-linetype objBlock "ByBlock") ; (vla-put-Lineweight objBlock -1) ; (if(=(getvar 'PStyleMode)0)(vla-put-PlotStyleName objBlock "ByBlock")) ) ) ) (prin1) ) (prin1)
    1 point
  5. I reckon you can change it, this line here changes the color. (vla-put-Color objBlock 0) Perhaps if you put a ; at the start of the lines that change for example layer and linetype, that might do what you want? You'd have to work out what to do from there though. The ; stops that line being implemented in the LISP
    1 point
  6. See if this works. ^C^C_select \_change _p; _p _c byblock;;_block \ _O;_R;
    1 point
×
×
  • Create New...