Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/07/2019 in all areas

  1. Give this a try: (defun _hatchcolorstolayer (lst / a d tc) ;; RJP » 2019-11-06 (vl-load-com) (vlax-for l (vla-get-layers (setq d (vla-get-activedocument (vlax-get-acad-object)))) (cond ((= -1 (vlax-get l 'lock)) (vlax-put l 'lock 0) (setq a (cons l a)))) ) (vlax-for b (vla-get-blocks d) (if (= 0 (vlax-get b 'isxref)) (vlax-for o b (cond ((and (= (vla-get-objectname o) "AcDbHatch") (setq tc (vla-get-truecolor o)) (setq tc (mapcar '(lambda (x) (vlax-get tc x)) '(red green blue))) (setq ln (cadr (assoc tc lst))) ) (or (tblobjname "layer" ln) (entmakex (append (entget (vlax-vla-object->ename o)) (list (cons 8 ln)))) ) (vl-catch-all-apply 'vla-put-layer (list o ln)) ) ) ) ) ) (foreach l a (vlax-put l 'lock -1)) (princ) ) ;; You will need to create your list of colors and new layers to feed to the function (_hatchcolorstolayer '(((128 210 4) "Poly_Stahlbeton") ((153 76 0) "Poly_Mauerwerk") ((245 245 235) "RJP-TEST")) )
    1 point
  2. 1 point
  3. Change the following line: (if (= (getvar "LUNITS") 2) (setq fac 25.4) (setq fac 1.0)) to (setq fac 1.0) or (if using MEASUREMENT system variable to define metric units): (if (= (getvar "MEASUREMENT") 1) (setq fac 25.4) (setq fac 1.0))
    1 point
  4. Here is a couple of old ones the 1:x needs to have plines added these are like 20 years old. Xfallper needs Multi getvals.lsp. Multi GETVALS.lsp XFALLPER.LSP XFALL.LSP
    1 point
  5. This Code is from Gilles Chanteau and maybe he will have a newer version. Edit_bloc_3.0_eng.dcl Edit_bloc_3.0_eng.lsp
    1 point
  6. (getfiled "Select File" (getvar 'dwgprefix) "" 16) Welcome to CADTutor Daniel
    1 point
×
×
  • Create New...