Visualstyles with AutoLisp
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Visualstyles with AutoLisp

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
HofCAD



Joined: 01 Jul 2005
Posts: 8

Posted: Mon Sep 18, 2006 2:19 pm    Post subject: Visualstyles with AutoLisp Reply with quote

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. Embarassed


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? Sad

Thanks in advance!

Regards,
HofCAD CSI

Back to top
View user's profile Send private message
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB