Good morning
I found three lisp programs from our site but these three lisps are not working, ok I will search once again sir.
- 5-Call Create TIN from File.lsp
- 4-createTINfromfile.lsp
- createsurffromcontours (vl-load-com)
(defun c: createsurffromcontours () (contours / C3D C3DDOC DATASTR PRODSTRING SURF1 SURFS TINCREATIONDATA VERSTRING)
(setq C3D (strcat "HKEY_LOCAL_MACHINE\\"
(if vlax-user-product-key
(vlax-user-product-key)
(vlax-product-key)
)
)
C3D (vl-registry-read C3D "Release")
verstring (substr C3D
1
(vl-string-search
"."
C3D
(+ (vl-string-search "." C3D) 1)
)
)
prodstring (strcat "AeccXUiLand.AeccApplication." verstring)
)
(setq datastr (strcat "AeccXLand.AeccTinCreationData." verstring))
(if (and (setq *acad* (vlax-get-acad-object))
(setq C3D (vla-getinterfaceobject *acad* prodstring))
(setq C3Ddoc (vla-get-activedocument C3D))
(setq surfs (vlax-get C3Ddoc 'surfaces))
(setq tincreationdata (vla-getinterfaceobject *acad* datastr))
)
(progn
(vlax-put tincreationdata 'baselayer "0")
(vlax-put tincreationdata 'layer "0")
(vlax-put tincreationdata
'description
"Createed Surface from Lisp"
)
(vlax-put tincreationdata 'name "Lisp EG")
(vlax-put tincreationdata 'style "Border Only")
;;style must exist!
(setq surf1
(vlax-invoke-method surfs 'addtinsurface tincreationdata)
)
(vlax-invoke
(vlax-get surf1 'contours)
'add
contours
"Added by lisp"
50.0 ;;Weeding distance
15.0 ;;Weeding angle
25.0 ;;Supplemental distance
0.05 ;;Midordinate distnace
)
)
)
)
(defun c:doit (/ ss idx thelist ent)
(if (setq ss (ssget "X" '((0 . "LWPOLYLINE")(8 . "Layer1"))))
(progn
(setq idx -1
thelist nil)
(while (setq ent (ssname ss (setq idx (1+ idx))))
(setq thelist (cons (vlax-ename->vla-object ent) thelist))
)
(createsurffromcontours thelist)
)
)
(princ)
)