×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

VISUALSTYLE & AutoLisp

VISUALSTYLE & AutoLisp

VISUALSTYLE & AutoLisp

(OP)
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

RE: VISUALSTYLE & AutoLisp

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources