Jump to content

3d mini menu Toolbox


Guest vizwhiz

Recommended Posts

Guest vizwhiz

hi There

 

check This out (and let me know if it works)

 

****

 

from CADdepot.com update newsletter

 

"Applying Customization: Right-Click Menus in LISP - AutoCAD tutorial on using the right-click capability to respond to prompts, Dave Pitzer, Autodesk.com"

 

http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=3369298&linkID=2475176

 

the original is:

 

(defun c: what ;;;etc bla bla bla
....
)

 

so check This out i couldnt resist Tinkering with the original code by Dave Pitzer

 

****

 

This is my version i renamed it to be 3d-doit.lsp

 

****

 

(defun c:3d-doit (/ qaz)
(initget 1 "B C L P R AR CO ER MO RO SC BX CX LX PX RE SB SL SU T U X XT")
(setq qaz (getkword "Draw 3d do-what: [<2d Doit>/Bpoly/Circle/Line/Pline/Rectang/<2d Edit>/ARray/COpy/ERase/MOve/ROtate/SCale/<3d Doit XL>/BoX/bPolyX/CircleX/pLineX/REctang/<3d Edit>/SUbtract/Union/inTersect/SLice/SBlice/eXtrude/eXTrudelast]:"))
(cond

;;;2d-doit commands go here

((= qaz "B")(command ".bpoly" pause ""))
((= qaz "C") (command ".circle" pause pause))
((= qaz "L") (command ".line"))
((= qaz "P") (command ".pline"))
((= qaz "R") (command ".rectang"))

;;;2d-edit commands go here

((= qaz "AR")(command ".array"))
((= qaz "CO")(command ".copy"))
((= qaz "ER")(command ".erase"))
((= qaz "MO")(command ".move"))
((= qaz "RO")(command ".rotate"))
((= qaz "SC")(command ".scale"))

;;;3d-doit commands go here

((= qaz "BX")(c:321)) ;;;(command ".box")
((= qaz "PX")(progn (command ".bpoly" pause "" "") (command ".extrude" "L" "" pause "" 0)))
((= qaz "CX")(progn (command ".circle" pause pause) (command ".extrude" "L" "" pause "" 0)))
((= qaz "LX")(progn (command ".pline") (command ".extrude" "L" "" pause "" 0)))
((= qaz "RE")(progn (command ".rectang" pause pause) (command ".extrude" "L" "" pause "" 0)))

;;;3d-edit commands go here

((= qaz "SL")(c:342)) ;;;(command ".slice"))
((= qaz "SB")(c:343)) ;;;(command ".slice")) keep Both option:
((= qaz "SU")(command ".subtract"))
((= qaz "T") (command ".intersect"))
((= qaz "U") (command ".union"))
((= qaz "X") (command ".extrude" pause "" pause "" 0 ""))
((= qaz "XT")(command ".extrude" "L" "" pause "" 0))

)
)

****

 

some of the options reference my own numerical alias system

just replace the front end numbers with the trailing code fragments

 

Thanks

 

Randy

Edited by SLW210
Code Tags
Link to comment
Share on other sites

  • 9 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...