×
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

Visual LISP
2

Visual LISP

Visual LISP

(OP)
Does any one know if this exists and if so where I can get general information on it at?

RE: Visual LISP

The Autodesk website has info on Viual LISP. You may want to look into using VBA for programming AutoCAD. It is much easier to learn and can do just about anything.

RE: Visual LISP

If you are working with AutoCAD2000, then you already have Visual Lisp.

On Command line of Acad just type:

VLIDE

and Visual Lisp window should open.

It having its own menu and Help in the menu, the rest is easy.

A few tricky turns exist of course and easier to ask them here then go trial-error.

Hope this helps.

http://members.asiaco.com/tigrek

RE: Visual LISP

(OP)
I actually need it for R14 - work hasn't upgraded yet.

RE: Visual LISP

Oh, sorry.

Visual Lisp for Acad 14 can be bought as a separate CD. Cost is trivial. The free downoadable Beta version is somewhere on AutoDesk site but has expired. I had once downloeded it to find that out.

In the meantime, I mean until you upgrade to Acad2000, and Vlisp comes with it, you can ask for any functionality and I will gladly write and post it.

Come to think of it, The Visual Lisp we are talking about is only the text editor platform with help and nothing else. Meaning, Lisp routines are just text files - write in any text editor and save as mySomething.lsp

The file extension must be .lsp so that it can be loaded from the Acad command line with

(load "mySomething")

Here is an example:
;------
;operates on ON layers only.
;connects lines into Pline but not existing plines.
;if existing plines are to be connected, first explode (ursprung)
;add to acad.lsp this -
;(load "joinlines")
;put this file (joinlines.lsp) into Acad\support\samurai\

;if Pedit malfunctions: alternatives - ENTGET

(defun dxf (n ed) (cdr (assoc n ed)))


(defun C:On-Layers()
;get all layers in the drawing
(setq onlayers (list  ""))(setq offlayers (list ""))
    (setq layer1 (tblnext "LAYER" t))
    (if  (and (= 0 (dxf 70 layer1))(>  (dxf 62 layer1) 0) )
        (setq onlayers (append onlayers (list (dxf 2 layer1))))    )
    (while     (setq layer1 (tblnext "LAYER"))(progn
        
        (if  (and (= 0 (dxf 70 layer1))(>  (dxf 62 layer1) 0) )
        (setq onlayers (append onlayers (list (dxf 2 layer1))))
        )
    ))
    
    
(setq onlayers (cdr onlayers))(princ)
(princ "\n\nThe Following layers are ON")(mapcar 'print onlayers)(princ "\n")
)



(defun C:JoinLines()
(command "cmdECHO" "0")
(setq OnLayers1 (C:On-Layers))

(foreach name1 Onlayers (progn        ;foreach progn
              
(setq filt1 (list (cons 0 "LINE")(cons 8 Name1)))
(while (setq s1 (ssget "X" filt1))        ;while
    (if (>  (sslength s1) 0)
        (command "Pedit" (ssname s1 0)  "_Y" "_Join" s1 "" "")
    )

);while

));foreach progn
    (princ "\nNo simple-lines left on ON-layers. This Command ignores Off-layers and PolyLines")(princ)
    (command "cmdECHO" "1")
)

(princ "\nSamurai commands Available:\non-layers, \njoinlines")(princ)

RE: Visual LISP

The handbook for Lisp commands is under
AutoCAD 14 Help >
Customization Guide > Part I - AutoLisp Reference

Hope this is useful.

A lisp routine for rotating a drawing to horizontal before plotting can be downloaded free from

http://members.fortunecity.com/tigrek

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