Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

VISUALSTYLE & AutoLisp

Status
Not open for further replies.

HofCAD

Computer
Feb 10, 2006
8
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.


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()
(if (> (atoi (substr (getvar "ACADVER") 1 2)) 16)
(DicSTYLE_LIST "ACAD_VISUALSTYLE")
(print "Works only in AutoCAD 2007+"))
)

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
 
Replies continue below

Recommended for you

Hello CAD friends,

Command -SHADEMODE en (command "SHADEMODE") gives in AutoCAD 2007:
Enter option [2D wireframe/3D wireframe/Hidden/Flat/Gouraud/fLat+edges/gOuraud+edges] <2D wireframe>:

Regards,
HofCAD CSI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor