H
HofCAD
Guest
Hello CAD friends,
I was wondering if anyone know if it is possible
to make visualstyles in AutoCAD 2007 with AutoLisp.
The next program list the visualstyles, but gives me more than I
was expecting.
It gives me 2dWireframe, 3D Hidden, 3dWireframe, Basic, Brighten, ColorChange, Conceptual, Dim, Facepattern, Flat, FlatWithEdges,
Gouraud, GouraudWithEdges, Linepattern, Realistic and Thicken.
Why?
If the styles Flat, FlatWithEdges, Gouraud and GouraudWithEdges
exists, why can I not use them in the command SHADEMODE?
Thanks in advance!
Regards,
HofCAD CSI
I was wondering if anyone know if it is possible
to make visualstyles in AutoCAD 2007 with AutoLisp.
The next program list the visualstyles, but gives me more than I
was expecting.
Code:
(defun DicSTYLE_LIST (dicname / dics dic i NameList)
(defun tempList (theObject / item TmpName)
(setq theList '())
(vlax-for item theObject
(setq TmpName (vla-getname theObject item))
(setq theList (append (list TmpName) theList))
)
(setq theList (reverse theList))
);defun
(setq dics (vla-get-dictionaries (vla-get-Activedocument (vlax-get-acad-object))))
(setq dic (vla-item dics dicname))
(setq Namelist (tempList dic))
(setq i 0)
(repeat (length Namelist)
(setq DicObj (vla-GetObject dic (nth i Namelist)))
(setq DicEnt (vlax-vla-object->ename DicObj))
(print (entget DicEnt))
(setq i (1+ i))
)
)
(defun c:VisStyl()
(textpage)
(if (> (atoi (substr (getvar "ACADVER") 1 2)) 16)
(DicSTYLE_LIST "ACAD_VISUALSTYLE")
(princ "*****Works only in AutoCAD 2007+ *****"))
(terpri)
)
It gives me 2dWireframe, 3D Hidden, 3dWireframe, Basic, Brighten, ColorChange, Conceptual, Dim, Facepattern, Flat, FlatWithEdges,
Gouraud, GouraudWithEdges, Linepattern, Realistic and Thicken.
Why?
If the styles Flat, FlatWithEdges, Gouraud and GouraudWithEdges
exists, why can I not use them in the command SHADEMODE?
Thanks in advance!
Regards,
HofCAD CSI
Last edited: