Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How to use lisp with autocad?

user-image
Question ajoutée par Noufal Ali , Designer (2D & 3D) , SAUDI FAN INDUSTRIES
Date de publication: 2016/01/18
danish shafiq
par danish shafiq , Accountant , Anayat Fan

thanks for the invitation and all experts in Autocad already answer this question in detail.

Vaqar Ali Sayyed
par Vaqar Ali Sayyed , AutoCad Opertator , Carlo Gavaazzi Arabia Co. Ltd.

An AutoLISP file must be loaded into the AutoCAD program before it can be ran.

Note: The Visual LISP IDE is available on Windows only.
  1. Open an AutoLISP (LSP) file and make sure the text editor is active.
  2. In Visual LISP, do one of the following:
    • From the menu bar, click Tools Load.
    • From the Run toolbar, click Load Active Edit Window.

    A message is displayed in the Console window if the program was loaded successfully.

  3. Start the AutoLISP function by doing one of the following:
    • At the Visual LISP Console window prompt, enter the name of a command or function name in parentheses, and press Enter.
    • At the AutoCAD Command prompt, enter the name of a command or function name in parentheses, and press Enter.

    If you switch back to Visual LISP before the command or function ends, the mouse pointer will appear as the Visual LISP icon. Switch back to AutoCAD and complete the command or function.

  4. Respond to any prompts or dialog boxes that are displayed.
Example

This example requires the installation of the Visual LISP Sample files.

  1. In Visual LISP, click File Open File.
  2. In the Open File dialog box, browse to the Sample\\VisualLISP folder, which is located in your AutoCAD installation directory.
  3. Double-click the drawline.lsp file.
  4. Make sure the text editor window containing the drawline.lsp program is active. If you are not sure whether the window is active, click anywhere in the window to activate it.
  5. Click the Load Active Edit Window button from the Run toolbar, or click Tools Load Text in Editor.

    Visual LISP responds by displaying a message in the Console window indicating it has loaded the program.

  6. Run thedrawlinefunction from the Console prompt by entering the function name in parentheses, then pressing Enter: (drawline)

    Thedrawlinefunction will prompt you to specify two points, and will then draw a straight line between those points. Whendrawlineprompts for user input, Visual LISP turns control over to AutoCAD to prompt for the points. What you see next depends on whether or not the AutoCAD windows are currently displayed on your desktop. If AutoCAD is already maximized, you will see the AutoCAD windows. But if AutoCAD is currently minimized, the windows will not automatically be restored and displayed. Instead, Visual LISP remains visible and your mouse pointer changes to a Visual LISP symbol.

    This symbol indicates that the Visual LISP window is no longer active. If this is the case, you must manually switch to the AutoCAD window. Click the AutoCAD icon on the Windows task bar to activate AutoCAD.

  7. Respond to the prompts by specifying points in the drawing area or at the Command prompt.

    After you respond to the prompts, control returns to Visual LISP and you will once again see the Visual LISP window.

    When you enter commands in the Visual LISP Console window or run a program loaded from the text editor, you may be frequently switching back and forth between the Visual LISP and AutoCAD windows. Aside from using the standard Windows methods of switching between windows, you can activate the AutoCAD window by choosing Window Activate AutoCAD from the Visual LISP menu, or by clicking the Activate AutoCAD button on the Run toolbar. If you are in AutoCAD and want to return to the Visual LISP environment, you can click its icon on the Windows task bar, or entervlispat the Command prompt or click Manage tab Applications panel Visual LISP Editor. 

Abdul Kareem Chala Mohammed
par Abdul Kareem Chala Mohammed , Senior Designer , iSmarthome

You can drag and drop all lisp files to AutoCAD window to work with that lisp.

 

Once you drag, there is an option for Autoload this lisp always ("Always load this applicartion")

 

To understand execution command just open LISP file with notepad and you can see lisp command after the text "defun"

 

 

in the autocad command line select appload and load any files in the lisp

shakil ahmad
par shakil ahmad , Accounts Executive , Est.Abdullah Blehan al dahaik

  • Respond to any prompts or dialog boxes that are displayed.
  • Start the AutoLISP function by doing one of the following:
  1. At the Visual LISP Console window prompt, enter the name of a command or function name in parentheses, and press Enter.
  2. At the AutoCAD Command prompt, enter the name of a command or function name in parentheses, and press Enter.
  3. If you switch back to Visual LISP before the command or function ends, the mouse pointer will appear as the Visual LISP icon. Switch back to AutoCAD and complete the command or function.
    1. In Visual LISP, do one of the following:
    2. From the menu bar, click Tools Load.
    3. From the Run toolbar, click Load Active Edit Window.

    A message is displayed in the Console window if the program was loaded successfully.

Open an AutoLISP (LSP) file and make sure the text editor is active.

 

Utilisateur supprimé
par Utilisateur supprimé

in autocad command line use appload command and load any file from lisp

Sarfaraz khan
par Sarfaraz khan , Internee , OGDCL

if lisp file does not reside in auto cad path, then use double click.

hamza sirri
par hamza sirri , Senior Draughtsman , ADSSC

How to uploading autocad lisp in the drawing and put your own command in the lispfile.load own lisp Do the following instruction :- 

1-Open your lisp with notepad and replace command with your own text without spaceC: yourowntext ( )

2-save lisp and close.3-drag and drop to autocad as show below.

how to load lisp

Mohamed Hussein Makin Mufarah
par Mohamed Hussein Makin Mufarah , Chief Engineer , Turbine maintenance , White Nile Sugar Co.ltd

At the AutoCAD command line, type AppLoad 

Select the program file as previously saved and click Load to load the program into the current drawing session. Click Close to close the Appload Dialog.

Sta Ji
par Sta Ji , Auto CAD Designer/Drafter , Haif Construction Company

first of all put the lisp file in the folder which you installed auto cad then type appload and press enter which will you open a new window through which you load the file.

ok after that it depends on the lisp file because in most of lisp files when you load it, it automatically shows you the next procedure.

Rijeesha Sinoop
par Rijeesha Sinoop , Sr.Draughtswoman / Technical coordinator , Petroserv,Pvt Ltd

If  you have the lisp programing in your system .you can copy it to your folder & then while ur using Cad..u can just enter APPLOAD then a window opens you can browse  the folder which you copied the LISP & click that file  then click LOAD IN that window,on the downside of that window it ll show loaded succesfully,then close it .then enter If u need coordinates....just enter XY ENTER  :/= ENTER select the point where u need the coordinates then enter it in cad file ...the coordinate ll b appeared automatically..like dat u can use another one also

More Questions Like This