Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JStephen on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visualstyles & AutoLisp

  • Thread starter Thread starter HofCAD
  • Start date Start date
Status
Not open for further replies.
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.:eek:



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?:confused:
If the styles Flat, FlatWithEdges, Gouraud and GouraudWithEdges
exists, why can I not use them in the command SHADEMODE?:confused:

Thanks in advance!

Regards,
HofCAD CSI
 
Last edited:
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top