Jump to content

Recommended Posts

Posted

just noticed above should read...

 

-move all lines, plines and circles with color less than 5 to layer D-3D-CLG
-move all lines, plines and circles with color greater than or equal to 5 to layer D-3D-CLM

Posted

I have a busy day today. 

 

For future usability, I would suggest a DCL for adding and subtracting layers, linetypes, objects.

 

I started on one once but it wasn't to my liking. Let me knock a few things out at work and I'll see what I can do.

 

I'll look into the Checkdrawings a little more as well.

 

 

Posted

I have combined together various routines used to clean these files. There are some missing sections in the code that I am really not sure about. These are the sections i have added a comment header but no code underneath. I have noticed some surfaces in the models where obviously the solids have been exploded, ideally the move section needs to move solids and surfaces to d-3d-sol.

(I am at a loss what the function strp does and why some text has an apostrophe in front of it ie 'STR)

 

 

;;; Clean drawings to match standards
;;;
;;; https://www.cadtutor.net/forum/topic/98263-extracting-block-data-to-a-report/#findComment-673250
;;;
;;; SLW210 (a.k.a. Steve Wilson)
;;;
;;; CheckDrawing_1-1.lsp
;;; 
;;; Made more robust layer handling and some general clean-up

;;;                                                                                                            
;;;**************************************************************************************************************
;;;| Moves 3D solids to layer `3D`                                                                              |
;;;| Moves centrelines (assumed to be lines with "center" linetype) to `CL` (for red) or `CL_SS` (for color 150)|
;;;| Sets all entities’ color, linetype, and lineweight to BYLAYER                                              |
;;;| Sets current layer to `0`                                                                                  |
;;;| Purges 3x                                                                                                  |
;;;| Sets UCS to World                                                                                          |
;;;| Sets visual style to Conceptual                                                                            |
;;;| Sets view to SW Isometric                                                                                  |
;;;| Zooms to Extents                                                                                           |
;;;| Ensures layer `0` is empty, and layers `CL`, `CL_SS`, `3D` exist with correct settings                     |
;;;*************************************************************************************************************|;



(defun c:CleanDrawing (/ ent lay typ ss i ltype entData)
;;;-bind any xrefs

  
;;;-explode any blocks 

  (explodeall)

; ;; Create layers with specified colors
  (ensure-layer "D-3D-SOL" 7) ; White
  (ensure-layer "D-3D-CLG" 1) ; Red
  (ensure-layer "D-3D-CLM" 5) ; Blue

;;; Get all entities
  (setq ss (ssget "_X"))
  (if ss
    (progn
      (setq i 0)
      (while (< i (sslength ss))
        (setq ent (ssname ss i))
        (setq entData (entget ent))
        (setq typ (cdr (assoc 0 entData)))
        (setq lay (cdr (assoc 8 entData)))
        (setq ltype (cdr (assoc 6 entData)))

;;;-move all solids or surfaces to layer D-3D-SOL 
        (if (and (equal typ "3DSOLID") (/= lay "D-3D-SOL"))
          (entmod (subst (cons 8 "D-3D-SOL") (assoc 8 entData) entData))
        )
;;;-move all lines, plines and circles with color less than 5 to layer D-3D-CLG
	
	
;;;-move all lines, plines and circles with color greater than or equal to 5 to layer D-3D-CLM
	

;;;delete all entities from Layer 0
	
	
;;;delete all non required layers
	
	(KeepLayersOnly)



;;; Set color, linetype, and lineweight to BYLAYER
        (if (assoc 62 entData)
          (entmod (subst (cons 62 256) (assoc 62 entData) entData))) ; Color = BYLAYER
        (if (assoc 6 entData)
          (entmod (subst (cons 6 "BYLAYER") (assoc 6 entData) entData))) ; Linetype
        (if (assoc 370 entData)
          (entmod (subst (cons 370 -1) (assoc 370 entData) entData))) ; Lineweight = BYLAYER

        (setq i (1+ i))
      )
    )
  )
;;;-set layer D-3D-SOL color 7(black), lineweight 0.3, transparency 0 (default?)
;;;-set layer D-3D-CLG color 1(red), lineweight 0.18, transparency 0 (default?)
;;;-set layer D-3D-CLM color 5(blue), lineweight 0.18, transparency 0 (default?)
;;;-set layer 0 color 7(black), lineweight default, transparency 0 (default?)
  
;;; Set current layer to sol
  (command "_.layer" "_set" "D-3D-SOL" "")
  (command "_.layer" "_c" "7" "" "")
  (command "_.layer" "_tr" "0" "" "")
  (command "_.layer" "_lw" "0.3" "" "")
  (command "_.layer" "_l" "Continuous" "" "")

;;; Set current layer to clm
  (command "_.layer" "_set" "D-3D-CLM" "")
  (command "_.layer" "_c" "5" "" "")
  (command "_.layer" "_tr" "0" "" "")
  (command "_.layer" "_lw" "0.18" "" "")
  (command "_.layer" "_l" "Center" "" "")

;;; Set current layer to clg
  (command "_.layer" "_set" "D-3D-CLG" "")
  (command "_.layer" "_c" "1" "" "")
  (command "_.layer" "_tr" "0" "" "")
  (command "_.layer" "_lw" "0.18" "" "")
  (command "_.layer" "_l" "Center" "" "")

;;; Set current layer to 0
  (command "_.layer" "_set" "0" "")
  (command "_.layer" "_c" "7" "" "")
  (command "_.layer" "_tr" "0" "" "")
  (command "_.layer" "_lw" "0.25" "" "")
  (command "_.layer" "_l" "Continuous" "" "")
  
;;; Purge unused items (3 passes)
  (repeat 3 (command "_.purge" "all" "*" "n"))

;;; Reset UCS, visual style, and view
  (command "_.ucs" "_world")
  (command "_.vscurrent" "Conceptual")
  (command "_.view" "_swiso")
  (command "_.zoom" "_extents")

 ;;;export to autocad
  
	(M2A)

  (princ "\nDrawing processed successfully.")
  (princ)
)


(defun explodeall ( / explode layouts )
   (setq layouts (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))
         explode t
   )
   (while explode
       (setq explode nil)
       (vlax-for layout layouts
           (vlax-for obj (vla-get-block layout)
               (and
                   (= "AcDbBlockReference" (vla-get-objectname obj))
                   (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-explode (list obj))))
                   (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-delete  (list obj))))
                   (setq explode t)
               )
           )
       )
   )
   ;(princ)
)

;;;KeepLayersOnly
(defun KeepLayersOnly ( / layersToKeep layerName layObj)
  ;; set current layer to 0
  (command "_.-layer" "s" "0" "")
  (princ "Current layer set to 0")
  (princ)
  ;; List of layers to keep (change as needed)
  (setq layersToKeep '("0" "D-3D-SOL" "D-3D-CLM" "D-3D-CLG"))
  
  ;; Start with the first layer in the drawing
  (setq layObj (tblnext "LAYER" T))
  
  ;; Loop through all layers
  (while layObj
    (setq layerName (cdr (assoc 2 layObj)))
    ;; If the layer is NOT in layersToKeep, try to delete it
    (if (not (member layerName layersToKeep))
      (progn
        ;; Try to delete the layer, ignore errors if it fails (e.g., current layer or layer in use)
        (vl-catch-all-apply
          (function (lambda () (command "_.-laydel" "n" layerName "" "yes")))
        )
      )
    )
    ;; Get the next layer
    (setq layObj (tblnext "LAYER"))
  )
  (princ "\nLayers deleted except those in the list.")
  (princ)

  )

;;strp
(defun strp (x) (eq (type x) 'STR))

;;ensure-layer
;; Ensure required layers exist (adjust as needed)
(defun ensure-layer (name color)
  (if (not (tblsearch "LAYER" name))
    (entmake
      (list
        '(0 . "LAYER")
        '(100 . "AcDbSymbolTableRecord")
        '(100 . "AcDbLayerTableRecord")
        (cons 2 name)         ; Layer name
        (cons 70 0)           ; Layer flags
        (cons 62 color)       ; ACI color
        (cons 6 "Continuous") ; Linetype
      )
    )
  )
)

(defun M2A ()
  (vl-load-com)

  ;; Get the current drawing
  (setq sourceFile (getvar "DWGNAME"))

  ;; Construct the export file name
  (setq	exportFileName
	 (strcat (vl-filename-directory "\cleaned\" sourceFile)
		 ""
		 (vl-filename-base sourceFile)
	 )
  )


  ;; Step 1: Set export options (focusing on just file format, bind xrefs, and no prefix/suffix)
  (command "-EXPORTTOAUTOCAD"	 "F"	    "2018"
	   ;; Specify format (e.g., 2018)
	   "B"	      "Y"
	   ;; Bind Xrefs: Yes
	   "T"	      "Insert"
	   ;; Bind Type: Insert
	   "M"	      "Y"
	   ;; Maintain file properties
	   "P"	      "."
	   ;; Empty prefix (no prefix)
	   "S"	      "."
	   ;; Empty suffix (no suffix)
	   ""	      exportFileName
		      ;; Filename for exported file
	  )

  (princ "\nDrawing processed successfully and saved in subfolder 'cleaned'.")
  (princ exportfilename)
)
;; End of function
(princ)

 

 

 

Posted
19 hours ago, jamami said:

...

(I am at a loss what the function strp does and why some text has an apostrophe in front of it ie 'STR)

 

 

 

 

Part of the original code I did, but basically, it checks if the type of the variable x is a string, if it is a string, it returns true, else it returns false. I picked that up some where, I think Jeffery P. Sanders website, but his site isn't working for me, handy function for me.

 

The 'apostrophe (') before a word indicates that the word should be treated as a literal symbol rather than a variable or function.

Posted

Interesting, there doesn't seem to be a necessity in lisp to declare variable types and array sizes.

Posted

I am still working at the rest of the improvements as work time allows.

Posted

that is music to my ears, to be honest i am making very slow progress but have been on it for a an inordinate amount of time.

I have an issue trying to move the objects below color 5 and equal or above color 5.

I realise that the objects themselves maybe not actually be color 150, 160 etc but actually they are BYlayer, so the logic becomes lines, polylines or circles whos color is above or equal to 5 or who reside on a layer that is a color above or equal to 5.

 

(setq obtyp ("LINE" "PLINE" "CIRCLE")

(if (member typ obtyp)
  (if (or((>= cdr((assoc 62 entData)) 5) (>= cdr((assoc 62 lay)) 5))
        (entmod (subst (cons 8 "D-3D-CLM") (assoc 8 entData) entData)) ;if above true 
		(entmod (subst (cons 8 "D-3D-CLG") (assoc 8 entData) entData))) ;else
)

 

i dont think the assoc 62 lay is correct

 

 

 

Posted

that is music to my ears, to be honest i am making very slow progress but have been on it for a an inordinate amount of time.

I have an issue trying to move the objects below color 5 and equal or above color 5.

I realise that the objects themselves maybe not actually be color 150, 160 etc but actually they are BYlayer, so the logic becomes lines, polylines or circles whos color is above or equal to 5 or who reside on a layer that is a color above or equal to 5.

 

 

 

 

 

 

Posted

I have come up with this 

(defun CheckEntColor (ent / entData color layerData layerColor )
  (if ent
    (progn
      (setq entData (entget ent))
      (setq color (cdr (assoc 62 entData))) ; Get color
      (cond
        ;; Case 1: Entity has direct color set
        ((and color (> color 5))
         (setq TargetLayerName "D-3D-CLM")
        )
        ;; Case 2: Color is BYLAYER (color code = nil or 256)
        ((or (not color) (= color 256))
         (setq layer (cdr (assoc 8 entData))) ; Get layer name
         (setq layerData (tblsearch "LAYER" layer)) ; Get layer table data
         (setq layerColor (cdr (assoc 62 layerData))) ; Get layer color
         (if (>= layerColor 5)
           (setq TargetLayerName "D-3D-CLM")
           (setq TargetLayerName "D-3D-CLG")
         )
        )
        ;; Default: color is set and <= 5
         (setq TargetLayerName "D-3D-CLG")
      )
    )
  )
)

 

 

does his look reasonable to your expert eye? how would  I then use the return value TargetLayerName in the following code, is the variable Public visible to other functions with the lsp file ?

 

 

 

 

 

Posted

i have found the answer to my last question re access to function variables by experimenting with code snippets.  

(defun c:try ()
  (addup)
)

(defun addUp (/ x y myval)
  (setq x 10)
  (setq y 20)
  (if (< (+ x y) 10)
    (setq myval "less than")
    (setq myval "greater than")
  )
  (princ myval)
  (princ)
)

the function returns the last variable established by setq 

 

Posted

At the risk of not having a modern AutoCAD at home to test (AutoCAD 2000i Layers are in the Express Tools), I think these modifications should be to your latest request, some of this I tested at work previously, no errors in the VLIDE...

 

;;; Clean drawings to match standards                                                                       |
;;;                                                                                                         |
;;; https://www.cadtutor.net/forum/topic/98263-extracting-block-data-to-a-report/page/4/#findComment-674064 |
;;;                                                                                                         |
;;; SLW210 (a.k.a. Steve Wilson)                                                                            |
;;;                                                                                                         |
;;; DWGProcessor.lsp                                                                                        |
;;;                                                                                                         |
;;; Made to specific request                                                                                |
;;;*********************************************************************************************************|

;|-explode any blocks                                                                                 
-create layers D-3D-SOL, D-3D-CLG, D-3D-CLM                                                           
-move all solids or surfaces to layer D-3D-SOL                                                        
-move all lines, plines and circles with color less than 5 to layer D-3D-CLG                          
-move all lines, plines and circles with color greater than or equal to 5 to layer D-3D-CLM           
-set all entities color bylayer, linetype by layer , transparency bylayer                             
-delete all entities from layer 0                                                                     
-set layer 0 color 7(black), lineweight default, transparency 0 (default?)                            
-set layer D-3D-SOL color 7(black), lineweight 0.3, transparency 0 (default?)                         
-set layer D-3D-CLG color 1(red), lineweight 0.18, transparency 0 (default?)                          
-set layer D-3D-CLM color 5(blue), lineweight 0.18, transparency 0 (default?)                         
-set layer 0 as current                                                                               
-purge unused items (3 passes)                                                                        
-set ucs to world                                                                                     
-set viewstyle to conceptual                                                                          
-set view to _swiso                                                                                   
-zoom extents                                                                                         
                                                                                                      
after the dwgs have been cleaned i think the audit report needs to be                                 
                                                                                                      
a flag that some layers are not 0,d-3d-sol/clg/clm and set up as above (color, weight etc)            
                                                                                                      
a flag to highlight linetypes other than continuous and centre exist(plus defaults)                   
                                                                                                      
a flag to highlight some entities are not lines, plines, circles or surfaces                          
                                                                                                      
a flag to highlight some entities are not defined bylayer,bylayer,bylayer,default                     
                                                                                                      
ie                                                                                                    
                                                                                                      
name/layerstates/linetypes/entitytypes/entitydef                                                      
                                                                                                      
dwg1,pass,pass,pass,pass                                                                              
                                                                                                    |;


(defun c:dwgprocessor (/	     doc	   ms
		       result	     layers-ok	   ltypes-ok
		       ents-ok	     props-ok	   layer-errors
		       ltype-errors  enttype-errors
		       prop-errors   csv-line
		      )
  (vl-load-com)
  (setq doc (vla-get-activedocument (vlax-get-acad-object)))
  (setq ms (vla-get-modelspace doc))
  ;; CSV path (same folder as drawing)
  (setq	*audit-csv-path*
	 (strcat (getvar "DWGPREFIX")
		 "DWG_Audit_Report.csv"
	 )
  )
  ;; Append to CSV
  (defun append2csv (line / file)
    (setq file (open *audit-csv-path* "a"))
    (if	file
      (progn (write-line line file) (close file))
      (prompt "\nERROR: Cannot write to audit CSV.")
    )
  )
  ;; Write header
  (defun writecsvheader	()
    (if	(not (findfile *audit-csv-path*))
      (append2csv
	"DWGNAME,LAYERSTATES,LINETYPES,ENTITYTYPES,ENTITYDEF,LAYER-ERRS,LT-ERRS,TYPE-ERRS,PROP-ERRS"
      )
    )
  )
  ;; Create or set a layer
  (defun makelayer (name color lw tran)
    (if	(not (tblsearch "layer" name))
      (vla-add (vla-get-layers doc) name)
    )
    (vla-put-color (vla-item (vla-get-layers doc) name) color)
    (vla-put-lineweight (vla-item (vla-get-layers doc) name) lw)
    (vla-put-transparency
      (vla-item (vla-get-layers doc) name)
      (vlax-make-variant tran)
    )
  )
  ;; Explode blocks
  (vlax-for ent	ms
    (if	(and (= "AcDbBlockReference" (vla-get-objectname ent))
	     (vlax-method-applicable-p ent 'explode)
	)
      (vla-explode ent)
    )
  )
  ;; Create layers
  (makelayer "D-3D-SOL" 7 30 0)		; black, 0.3mm
  (makelayer "D-3D-CLG" 1 18 0)		; red, 0.18mm
  (makelayer "D-3D-CLM" 5 18 0)		; blue, 0.18mm
  (makelayer "0" 7 -1 0)		; default lw
  ;; Error counters
  (setq	layer-errors 0
	ltype-errors 0
	enttype-errors 0
	prop-errors 0
  )
  ;; Process objects
  (vlax-for ent	ms
    (let ((ename (vla-get-objectname ent))
	   (clr (vla-get-color ent))
	   (lt (vla-get-linetype ent))
	   (lyr (vla-get-layer ent))
	 )
	 ;; Move objects by type & color
	 (cond
	   ((wcmatch ename "AcDb3dSolid,AcDbSurface")
	    (vla-put-layer ent "D-3D-SOL")
	   )
	   ((and (member ename '("AcDbLine" "AcDbPolyline" "AcDbCircle"))
		 (< clr 5)
	    )
	    (vla-put-layer ent "D-3D-CLG")
	   )
	   ((and (member ename '("AcDbLine" "AcDbPolyline" "AcDbCircle"))
		 (>= clr 5)
	    )
	    (vla-put-layer ent "D-3D-CLM")
	   )
	 )
	 ;; Set ByLayer
	 (if (/= clr 256)
	   (progn (vla-put-color ent 256)
		  (setq prop-errors (1+ prop-errors))
	   )
	 )
	 (if (/= (strcase lt) "BYLAYER")
	   (progn (vla-put-linetype ent "BYLAYER")
		  (setq prop-errors (1+ prop-errors))
	   )
	 )
	 (vla-put-transparency ent (vlax-make-variant 0))
	 ;; Track wrong types
	 (if (not (member ename
			  '("AcDbLine"	       "AcDbPolyline"
			    "AcDbCircle"       "AcDb3dSolid"
			    "AcDbSurface"
			   )
		  )
	     )
	   (setq enttype-errors (1+ enttype-errors))
	 )
	 ;; Track wrong linetypes
	 (if (not
	       (member (strcase lt) '("BYLAYER" "CONTINUOUS" "CENTER"))
	     )
	   (setq ltype-errors (1+ ltype-errors))
	 )
    )
  )
  ;; Delete everything on layer "0"
  (vlax-for ent	ms
    (if	(= (strcase (vla-get-layer ent)) "0")
      (vla-delete ent)
    )
  )
  ;; Set layer 0 current
  (vla-put-activelayer
    doc
    (vla-item (vla-get-layers doc) "0")
  )
  ;; Purge All (3 times)
  (repeat 3 (command "_.PURGE" "ALL" "*" "N"))
  ;; Purge Regapps (2 times)
  (repeat 2 (command "_.PURGE" "Regapps" "*" "N"))
  ;; Set UCS/view
  (command "_.UCS" "_W")
  (command "_.VISUALSTYLES" "_CONCEPTUAL")
  (command "_.VIEW" "_SWISO")
  (command "_.ZOOM" "_E")
  ;; Final checks
  (setq	layers-ok (and (tblsearch "layer" "0")
		       (tblsearch "layer" "D-3D-SOL")
		       (tblsearch "layer" "D-3D-CLG")
		       (tblsearch "layer" "D-3D-CLM")
		  )
  )
  ;; Build audit status
  (setq	result (strcat (getvar "DWGNAME")
		       ","
		       (if layers-ok
			 "PASS"
			 "FAIL"
		       )
		       ","
		       (if (= ltype-errors 0)
			 "PASS"
			 "FAIL"
		       )
		       ","
		       (if (= enttype-errors 0)
			 "PASS"
			 "FAIL"
		       )
		       ","
		       (if (= prop-errors 0)
			 "PASS"
			 "FAIL"
		       )
		       ","
		       (itoa layer-errors)
		       ","
		       (itoa ltype-errors)
		       ","
		       (itoa enttype-errors)
		       ","
		       (itoa prop-errors)
	       )
  )
  ;; Write header and result
  (writecsvheader)
  (append2csv result)
  (prompt (strcat "\nDWGProcessor Complete. Audit: " result))
  (princ)
)

 

At least it should get you moving in the right direction, I hope, until I can test next week.

 

Here is what I came up with for the greater than less than...

 

;; Move objects by type & color
	 (cond
	   ((wcmatch ename "AcDb3dSolid,AcDbSurface")
	    (vla-put-layer ent "D-3D-SOL")
	   )
	   ((and (member ename '("AcDbLine" "AcDbPolyline" "AcDbCircle"))
		 (< clr 5)
	    )
	    (vla-put-layer ent "D-3D-CLG")
	   )
	   ((and (member ename '("AcDbLine" "AcDbPolyline" "AcDbCircle"))
		 (>= clr 5)
	    )
	    (vla-put-layer ent "D-3D-CLM")
	   )
	 )

 

 

Posted

Thank you

Am incorrect this routine prepares the report and cleans up the file at the same time ?

if I want to run an audit of all drawings on the folder in the future I should extract the reporting sections of the code or just let whole routine run again ?

my concern with the colour check was that if the items are defined by layer , then it is the colour of the layer that the entity resides on needs checking not the entity colour itself .

I will test this on Monday when I am close to a pc again .

i have several more folders to process and this will really speed things up for me , thanks once again .

Posted

You might finish up before I get time to finish, but selecting what to do, adding, mapping and removing layers, report or not, etc. is part of the DCL addition I am working on, also was working on adding the drawings to be run on. I'll try to get back on that as time allows.

 

Yes, I tried to go item by item for your request, you just need to run the -EXPORTTOAUTOCAD LISP, then run this.

 

I am far from an expert in AutoLISP and VLISP. Still learning as I go and even then mostly just the things I need for my work. I got back to working in LISP several years ago (first started way back in the 90s), but due to work requirements just slowly building my skills back up. I started several LISPs to do some things at work, that was started back around 2022 and just now trying to get those going again.

 

I started a few years ago going through everything at AfraLISP and also doing the Garden Path tutorial.

 

I should have a slow week next week at work, I am pretty well caught up on everything.

 

 

 

Posted

I am going to look at the garden path tutorial thank you.

i notice that you have changed a lot of the original routine to visual lisp now , I have a lot of reading to do as I have no knowledge of lisp at all .

your work has really helped me and I am very grateful for that .

Posted
7 minutes ago, SLW210 said:

You might finish up before I get time to finish, but selecting what to do, adding, mapping and removing layers, report or not, etc. is part of the DCL addition I am working on, also was working on adding the drawings to be run on. I'll try to get back on that as time allows.

 

Yes, I tried to go item by item for your request, you just need to run the -EXPORTTOAUTOCAD LISP, then run this.

 

I am far from an expert in AutoLISP and VLISP. Still learning as I go and even then mostly just the things I need for my work. I got back to working in LISP several years ago (first started way back in the 90s), but due to work requirements just slowly building my skills back up. I started several LISPs to do some things at work, that was started back around 2022 and just now trying to get those going again.

 

I started a few years ago going through everything at AfraLISP and also doing the Garden Path tutorial.

 

I should have a slow week next week at work, I am pretty well caught up on everything.

 

 

 

@Yes, I tried to go item by item for your request, you just need to run the -EXPORTTOAUTOCAD LISP, then run this.@

 

i tried this but there is an issue .

if the mechanical layers (AM_7, AM_5) etc have objects on them then they are exported along with the linetype .

I found the way around this was to set linetype/weight/trans /col etc BYLAYER then move the entity  to the correct layer D-3D-SOL etc

then exporttoautocad.

Posted

Can you post a drawing like that? Maybe we can do that with LISP, I usually -ExporttoAutoCAD, then move the objects, though I'm not dealing with a lot of files.

 

If I have time I'll try to set up some Mechanical drawings, I may have some shafts to do anyway.

Posted

i tried running the script today but get the error:-

"; error: ActiveX Server returned the error: unknown name: transparency"

 

any ideas?

 

 

Posted

tried remarking the transpareny liens out and now i get 

;error no function LT

; error: no function clr

  (vlax-for ent ms
    (let ((ename (vla-get-objectname ent))
       (clr (vla-get-color ent))
       (lt (vla-get-linetype ent))
       (lyr (vla-get-layer ent))
     )

 

i have out through a decoding editor and it doesnt pick up these bugs?

other than not being declared in the header (which i dont think is compulsory?) I cant visually see why this is tripping over.

 

 

Posted

Yes, I have the fix, I was handling transparency wrong, something I couldn't check from home.

 

Give me a couple of minutes, I had anticipated some Layer issues as I mentioned.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...