Aller au contenu

Messages recommandés

Posté(e)

Bonjour à tous, un petit utilitaire qui affiche le codes DXF !

bien lire le commentaire !

Daniel OLIVES

 
Content-Type: text; name="DXFLFR.lsp"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="DXFLFR.lsp"

;;..DXFL Written by Daron Denton, (c)2002
;;
;;requires DOSLIB 6.0 - www.mcneel.com
;;
;;Traduit par d.OLIVES en langue francaise pour l'affichage - le 2005-10-07
;;

(defun c:DXFL (/ DXF-STRLIST ENT TEMP VERDOS)
; Lignes suivantes supprimées dans AutoCAD 2008
;(if (not (dos_help))
;	(progn (alert "\nCette fonction  nécessite que DOSLIB 6.0
;				   \nsoit chargée - www.mcneel.com. 
;				   \n 
;				   \nfonction de sortie.")(QUIT)
;	)
;)
			   ; avec AutoCAD 2008 --> dos_version = (7 6 0)
;(if (not (>= (substr (dos_version) 1 1) "7")) 
;	(progn (alert "\nCette fonction  nécessite que DOSLIB 6.0
;				   \nsoit chargée - www.mcneel.com. 
;				   \n 
;				   \nfonction de sortie.")(QUIT)
;	)
; )

(cond ((= VERDOS "7 6 0")
(progn (alert "\nCette fonction  nécessite que DOSLIB 6.0
		   \nsoit chargée - www.mcneel.com. 
		   \n 
		   \nfonction de sortie.")(QUIT)
		(princ "Version DosLib non égale à : 7 6 0")
)
(princ "7 6 0")
)
)
(setq ENT (entsel "\nSelectionner un objet pour lister les codes DXF:"))
(if ENT 
 (progn
  (setq DXFLIST (entget (car ENT)))
  (if (/= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE")
  ;..trié par Frank Oquendo www.acadx.com
   (setq DXFLIST (vl-sort DXFLIST '(lambda (x y) (< (car x)(car y))))) 
  )
  (foreach X DXFLIST 
   (cond ; cond principal
 ;------------------
    ((= (car X) -1)
	(setq DXF-STRLIST 
		(append DXF-STRLIST 
			(list 
				(cons "-1     - Noms entité" (vl-prin1-to-string (cdr X)))
			)
		)
	)
    )
 ;------------------
    ((= (car X) 0)
	(setq DXF-STRLIST 
		(append DXF-STRLIST 
			(list 
				(cons "0      - Type entité" (vl-prin1-to-string (cdr X)))
			)
		)
	)
    )
 ;------------------
    ((= (car X) 1)
	(setq DXF-STRLIST 
		(append DXF-STRLIST 
			(list 
				(cons "1      - Valeur chaine caractères" 
					(vl-prin1-to-string (cdr X))
				)
			)
		)
	)
 )
 ;------------------
    ((= (car X) 2)
	(setq DXF-STRLIST 
		(append DXF-STRLIST 
			(list 
				(cons "2      - Noms du bloc" (vl-prin1-to-string (cdr X)))
			)
		)
	)
    )
 ;------------------
    ((= (car X) 3)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") (setq TEMP "3      - Noms du style")  )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
   )
    )
 ;------------------
    ((= (car X) 5)
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons "5      - Poignée d'entitée" (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 6)
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons "6      - Type de ligne" (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 7)
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons "7      - Style de texte" (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 8)
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons "8      - Noms de la couche" (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 10)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "ARC")        
	(setq TEMP "10    - Point central") 
   )
      ((= (cdr (assoc 0 DXFLIST)) "CIRCLE")     
	(setq TEMP "10    - Point central") 
   )
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION")  
	(setq TEMP "10    - Point de définition") 
   )
      ((= (cdr (assoc 0 DXFLIST)) "ELLIPSE")    
   (setq TEMP "10    - Point central") )
      ((= (cdr (assoc 0 DXFLIST)) "INSERT")     
	(setq TEMP "10    - Point d'Insertion")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "LINE")       
	(setq TEMP "10    - Point de départ")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE") 
	(setq TEMP "10    - Coordonnées des sommets")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "POLYLINE")   
	(setq TEMP "10    - Point toujours 0 "factice"")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "TEXT")       
	(setq TEMP "10    - 1er point de l'alignement")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 11)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "11    - Point milieu du texte")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "ELLIPSE")   
	(setq TEMP "11    - Point final de l'axe majeur")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "LINE")      
	(setq TEMP "11    - Point final")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "TEXT")      
	(setq TEMP "11    - 2nd point de l'alignement")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
   )
    )
 ;------------------
    ((= (car X) 12)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "12    - Point d'insertion des clones")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 13)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "13    - Point de définition des dimensions linéaires et angulaires")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
   )
    )
 ;------------------
    ((= (car X) 14)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "14    - Point de définition des dimensions linéaires et angulaires")  )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 15)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "15    - Point de définition du diamètre, rayon, et angle")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 16)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "16    - Point de définition du diamètre, rayon, et angle")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 38)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE") 
	(setq TEMP "38    - Elevation, optionnel")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 39)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE") 
	(setq TEMP "39    - Epaisseur, optionnel")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 40)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "ARC")        
	(setq TEMP "40    - Rayon")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "ELLIPSE")    
	(setq TEMP "40    - Ratio de l'axe mineur a l'axe majeur")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "CIRCLE")     
	(setq TEMP "40    - Rayon")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION")  
	(setq TEMP "40    - Longueur de l'étiquette des dimensions des rayons et diamètres")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE") 
	(setq TEMP "40    - Largeur de départ")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "POLYLINE")   
	(setq TEMP "40    - Largeur de départ")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "TEXT")       
	(setq TEMP "40    - Hauteur du texte")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list (cons TEMP (vl-prin1-to-string (cdr X))))))
    )
 ;------------------
    ((= (car X) 41)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION")  
	(setq TEMP "41    - Facteur d'expansion du texte, optionnel")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "ELLIPSE")    
	(setq TEMP "41    - Paramètre de départ")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE") 
	(setq TEMP "41    - Largeur de fin")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "INSERT")     
	(setq TEMP "41    - Facteur d'échelle X")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "POLYLINE")   
	(setq TEMP "41    - Largeur de fin")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "TEXT")       
	(setq TEMP "41    - Echelle relative en X , optionnel")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 42)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION")  
	(setq TEMP "42    - Mesure actuelle, optionnel")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "ELLIPSE")    
	(setq TEMP "42    - Paramètre de fin")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE") 
	(setq TEMP "42    - Bombement - Bulge")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "INSERT")     
	(setq TEMP "42    - Facteur d'échelle en Y")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 43)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE") 
	(setq TEMP "43    - Epaisseur constante, optionnel")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "INSERT")       
	(setq TEMP "43    - Facteur d'échelle en Z")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 44)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "INSERT")       
	(setq TEMP "44    - Espacement des colonnes, optionnel")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 45)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "INSERT")       
	(setq TEMP "45    - Espacement des rangées, optionnel")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 50)
     (cond
      ((or
        (= (cdr (assoc 0 DXFLIST)) "INSERT")
        (= (cdr (assoc 0 DXFLIST)) "TEXT")
       )
       (setq TEMP "50    - Rotation en radians")
      )
      ((= (cdr (assoc 0 DXFLIST)) "ARC") 
	(setq TEMP "50    - Angle de départ")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION")  
	(setq TEMP "50    - Angle de rotation, dimension horizontale ou verticale")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST (append DXF-STRLIST (list (cons TEMP (vl-prin1-to-string (cdr X))))))
    )
 ;------------------
    ((= (car X) 51)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "ARC")       
	(setq TEMP "51    - Angle de fin")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "51    - Angle négatif entre l'axe X OCS et l'axe X SCU") 
   )
      ((= (cdr (assoc 0 DXFLIST)) "TEXT")      
	(setq TEMP "51    - Angle oblique")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 52)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "52    - Angle des lignes d'extension") 
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 53)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "53    - Angle de rotation du texte par rapport à son orientation par défaut") 
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 66)
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons "66    - Entitées suivantes" (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 67)
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons "67    - Espace" (vl-prin1-to-string (cdr X))))))
    )
 ;------------------
    ((= (car X) 70)
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons "70    - bit de code drapeau" (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 71)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "71    - Point d'attache") 
   )
      ((= (cdr (assoc 0 DXFLIST)) "INSERT")    
	(setq TEMP "71    - Nre de rangée, optionnel")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "POLYLINE")  
	(setq TEMP "71    - Compte les sommets de la maille N de la polyligne, optionnel")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "TEXT")      
	(setq TEMP "71    - Generation flags, optional")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 72)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "DIMENSION") 
	(setq TEMP "72    - Espacement des lignes de texte") 
   )
      ((= (cdr (assoc 0 DXFLIST)) "POLYLINE")  
	(setq TEMP "72    - Compte les sommets de la maille N de la polyligne, optionnel")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "TEXT")      
	(setq TEMP "72    - Type justification horizontale, optionnel")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 73)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "POLYLINE")   
	(setq TEMP "73    - Smooth surface M density, optional")  
   )
      ((= (cdr (assoc 0 DXFLIST)) "TEXT")       
	(setq TEMP "73    - Type justification Verticale, optionnel")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 74)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "POLYLINE")   
	(setq TEMP "74    - Smooth surface N density, optional")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 75)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "POLYLINE")   
	(setq TEMP "75    - Curves and smooth surface type, optional")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 90)
     (cond
      ((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE") 
	(setq TEMP "90    - Nombre de sommets")  
   )
      (T (setq TEMP (itoa (car X))) )
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons TEMP (vl-prin1-to-string (cdr X)))
		)
	)
   )
    )
 ;------------------
    ((= (car X) 100)
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons "100  - Data marqueur de sous-classe" (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((= (car X) 210)
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons "210  - Direction de l'extrusion" (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    ((and
      (> (car X) 329)
      (< (car X) 340)
     )
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons (strcat (itoa (car X)) "  - Soft pointer handle") (vl-prin1-to-string (cdr X)))
		)
	)
   )
    )
 ;------------------
    ((= (car X) 410)
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons "410  - Noms de la présentation" (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
    (T 
     (setq DXF-STRLIST 
	(append DXF-STRLIST 
		(list 
			(cons (itoa (car X)) (vl-prin1-to-string (cdr X)))
		)
	)
  )
    )
 ;------------------
   ) ;fin cond 
  )
  (dos_proplist "LISTE DES CODES DXF associés au objets" "Numéro DXF associé/description:                       Valeur associée:" DXF-STRLIST )
 )
 (setq DXFLIST nil)
)
DXFLIST 
)

Posté(e)

Content-Type: text; name="DXFLFR.lsp"

Content-Transfer-Encoding: 8bit

Content-Disposition: inline; filename="DXFLFR.lsp"

 

;;..DXFL Written by Daron Denton, ©2002

;;

;;requires DOSLIB 6.0 - www.mcneel.com

;;

;;Traduit par d.OLIVES en langue francaise pour l'affichage - le 2005-10-07

;;

 

(defun c:DXFL (/ DXF-STRLIST ENT TEMP VERDOS)

; Lignes suivantes supprimées dans AutoCAD 2008

;(if (not (dos_help))

; (progn (alert "\nCette fonction nécessite que DOSLIB 6.0

; \nsoit chargée - www.mcneel.com.

; \n

; \nfonction de sortie.")(QUIT)

; )

;)

; avec AutoCAD 2008 --> dos_version = (7 6 0)

;(if (not (>= (substr (dos_version) 1 1) "7"))

; (progn (alert "\nCette fonction nécessite que DOSLIB 6.0

; \nsoit chargée - www.mcneel.com.

; \n

; \nfonction de sortie.")(QUIT)

; )

; )

 

(cond ((= VERDOS "7 6 0")

(progn (alert "\nCette fonction nécessite que DOSLIB 6.0

\nsoit chargée - www.mcneel.com.

\n

\nfonction de sortie.")(QUIT)

(princ "Version DosLib non égale à : 7 6 0")

)

(princ "7 6 0")

)

)

(setq ENT (entsel "\nSelectionner un objet pour lister les codes DXF:"))

(if ENT

(progn

(setq DXFLIST (entget (car ENT)))

(if (/= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE")

;..trié par Frank Oquendo www.acadx.com

(setq DXFLIST (vl-sort DXFLIST '(lambda (x y) (< (car x)(car y)))))

)

(foreach X DXFLIST

(cond ; cond principal

;------------------

((= (car X) -1)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "-1 - Noms entité" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 0)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "0 - Type entité" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 1)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "1 - Valeur chaine caractères"

(vl-prin1-to-string (cdr X))

)

)

)

)

)

;------------------

((= (car X) 2)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "2 - Noms du bloc" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 3)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION") (setq TEMP "3 - Noms du style") )

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 5)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "5 - Poignée d'entitée" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 6)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "6 - Type de ligne" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 7)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "7 - Style de texte" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 8)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "8 - Noms de la couche" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 10)

(cond

((= (cdr (assoc 0 DXFLIST)) "ARC")

(setq TEMP "10 - Point central")

)

((= (cdr (assoc 0 DXFLIST)) "CIRCLE")

(setq TEMP "10 - Point central")

)

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "10 - Point de définition")

)

((= (cdr (assoc 0 DXFLIST)) "ELLIPSE")

(setq TEMP "10 - Point central") )

((= (cdr (assoc 0 DXFLIST)) "INSERT")

(setq TEMP "10 - Point d'Insertion")

)

((= (cdr (assoc 0 DXFLIST)) "LINE")

(setq TEMP "10 - Point de départ")

)

((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE")

(setq TEMP "10 - Coordonnées des sommets")

)

((= (cdr (assoc 0 DXFLIST)) "POLYLINE")

(setq TEMP "10 - Point toujours 0 "factice"")

)

((= (cdr (assoc 0 DXFLIST)) "TEXT")

(setq TEMP "10 - 1er point de l'alignement")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 11)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "11 - Point milieu du texte")

)

((= (cdr (assoc 0 DXFLIST)) "ELLIPSE")

(setq TEMP "11 - Point final de l'axe majeur")

)

((= (cdr (assoc 0 DXFLIST)) "LINE")

(setq TEMP "11 - Point final")

)

((= (cdr (assoc 0 DXFLIST)) "TEXT")

(setq TEMP "11 - 2nd point de l'alignement")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 12)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "12 - Point d'insertion des clones")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 13)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "13 - Point de définition des dimensions linéaires et angulaires")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 14)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "14 - Point de définition des dimensions linéaires et angulaires") )

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 15)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "15 - Point de définition du diamètre, rayon, et angle")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 16)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "16 - Point de définition du diamètre, rayon, et angle")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 38)

(cond

((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE")

(setq TEMP "38 - Elevation, optionnel")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 39)

(cond

((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE")

(setq TEMP "39 - Epaisseur, optionnel")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 40)

(cond

((= (cdr (assoc 0 DXFLIST)) "ARC")

(setq TEMP "40 - Rayon")

)

((= (cdr (assoc 0 DXFLIST)) "ELLIPSE")

(setq TEMP "40 - Ratio de l'axe mineur a l'axe majeur")

)

((= (cdr (assoc 0 DXFLIST)) "CIRCLE")

(setq TEMP "40 - Rayon")

)

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "40 - Longueur de l'étiquette des dimensions des rayons et diamètres")

)

((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE")

(setq TEMP "40 - Largeur de départ")

)

((= (cdr (assoc 0 DXFLIST)) "POLYLINE")

(setq TEMP "40 - Largeur de départ")

)

((= (cdr (assoc 0 DXFLIST)) "TEXT")

(setq TEMP "40 - Hauteur du texte")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list (cons TEMP (vl-prin1-to-string (cdr X))))))

)

;------------------

((= (car X) 41)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "41 - Facteur d'expansion du texte, optionnel")

)

((= (cdr (assoc 0 DXFLIST)) "ELLIPSE")

(setq TEMP "41 - Paramètre de départ")

)

((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE")

(setq TEMP "41 - Largeur de fin")

)

((= (cdr (assoc 0 DXFLIST)) "INSERT")

(setq TEMP "41 - Facteur d'échelle X")

)

((= (cdr (assoc 0 DXFLIST)) "POLYLINE")

(setq TEMP "41 - Largeur de fin")

)

((= (cdr (assoc 0 DXFLIST)) "TEXT")

(setq TEMP "41 - Echelle relative en X , optionnel")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 42)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "42 - Mesure actuelle, optionnel")

)

((= (cdr (assoc 0 DXFLIST)) "ELLIPSE")

(setq TEMP "42 - Paramètre de fin")

)

((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE")

(setq TEMP "42 - Bombement - Bulge")

)

((= (cdr (assoc 0 DXFLIST)) "INSERT")

(setq TEMP "42 - Facteur d'échelle en Y")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 43)

(cond

((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE")

(setq TEMP "43 - Epaisseur constante, optionnel")

)

((= (cdr (assoc 0 DXFLIST)) "INSERT")

(setq TEMP "43 - Facteur d'échelle en Z")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 44)

(cond

((= (cdr (assoc 0 DXFLIST)) "INSERT")

(setq TEMP "44 - Espacement des colonnes, optionnel")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 45)

(cond

((= (cdr (assoc 0 DXFLIST)) "INSERT")

(setq TEMP "45 - Espacement des rangées, optionnel")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 50)

(cond

((or

(= (cdr (assoc 0 DXFLIST)) "INSERT")

(= (cdr (assoc 0 DXFLIST)) "TEXT")

)

(setq TEMP "50 - Rotation en radians")

)

((= (cdr (assoc 0 DXFLIST)) "ARC")

(setq TEMP "50 - Angle de départ")

)

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "50 - Angle de rotation, dimension horizontale ou verticale")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST (append DXF-STRLIST (list (cons TEMP (vl-prin1-to-string (cdr X))))))

)

;------------------

((= (car X) 51)

(cond

((= (cdr (assoc 0 DXFLIST)) "ARC")

(setq TEMP "51 - Angle de fin")

)

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "51 - Angle négatif entre l'axe X OCS et l'axe X SCU")

)

((= (cdr (assoc 0 DXFLIST)) "TEXT")

(setq TEMP "51 - Angle oblique")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 52)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "52 - Angle des lignes d'extension")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 53)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "53 - Angle de rotation du texte par rapport à son orientation par défaut")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 66)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "66 - Entitées suivantes" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 67)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "67 - Espace" (vl-prin1-to-string (cdr X))))))

)

;------------------

((= (car X) 70)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "70 - bit de code drapeau" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 71)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "71 - Point d'attache")

)

((= (cdr (assoc 0 DXFLIST)) "INSERT")

(setq TEMP "71 - Nre de rangée, optionnel")

)

((= (cdr (assoc 0 DXFLIST)) "POLYLINE")

(setq TEMP "71 - Compte les sommets de la maille N de la polyligne, optionnel")

)

((= (cdr (assoc 0 DXFLIST)) "TEXT")

(setq TEMP "71 - Generation flags, optional")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 72)

(cond

((= (cdr (assoc 0 DXFLIST)) "DIMENSION")

(setq TEMP "72 - Espacement des lignes de texte")

)

((= (cdr (assoc 0 DXFLIST)) "POLYLINE")

(setq TEMP "72 - Compte les sommets de la maille N de la polyligne, optionnel")

)

((= (cdr (assoc 0 DXFLIST)) "TEXT")

(setq TEMP "72 - Type justification horizontale, optionnel")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 73)

(cond

((= (cdr (assoc 0 DXFLIST)) "POLYLINE")

(setq TEMP "73 - Smooth surface M density, optional")

)

((= (cdr (assoc 0 DXFLIST)) "TEXT")

(setq TEMP "73 - Type justification Verticale, optionnel")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 74)

(cond

((= (cdr (assoc 0 DXFLIST)) "POLYLINE")

(setq TEMP "74 - Smooth surface N density, optional")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 75)

(cond

((= (cdr (assoc 0 DXFLIST)) "POLYLINE")

(setq TEMP "75 - Curves and smooth surface type, optional")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 90)

(cond

((= (cdr (assoc 0 DXFLIST)) "LWPOLYLINE")

(setq TEMP "90 - Nombre de sommets")

)

(T (setq TEMP (itoa (car X))) )

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons TEMP (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 100)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "100 - Data marqueur de sous-classe" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 210)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "210 - Direction de l'extrusion" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((and

(> (car X) 329)

(< (car X) 340)

)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons (strcat (itoa (car X)) " - Soft pointer handle") (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

((= (car X) 410)

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons "410 - Noms de la présentation" (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

(T

(setq DXF-STRLIST

(append DXF-STRLIST

(list

(cons (itoa (car X)) (vl-prin1-to-string (cdr X)))

)

)

)

)

;------------------

) ;fin cond

)

(dos_proplist "LISTE DES CODES DXF associés au objets" "Numéro DXF associé/description: Valeur associée:" DXF-STRLIST )

)

(setq DXFLIST nil)

)

DXFLIST

)

 

Posté(e)

Bonjour à toutes et tous,

 

J'ai testé, mais AutoCAD me retourne :

 

Commande: XFL

Selectionner un objet pour lister les codes DXF:; erreur: no function

definition: DOS_PROPLIST

Commande:

 

Peut-être une erreur de recopie depuis le forum (des smileys se sont glissés dans ton code !!!)

 

PS : J'ai chargé DOSlib78 !) et suis sous une V2008 pleine !

Civil 3D 2025 - COVADIS_18.3b

https://www.linkedin...3%ABt-95313341/

Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer. Politique de confidentialité