See the top rated post in this thread. Click here

Results 1 to 2 of 2

Thread: Help with autolisp (2 lisp programs in one lisp execution)

  1. #1
    Login to Give a bone

    Default Help with autolisp (2 lisp programs in one lisp execution)

    Hi to all My name Javier
    Thanks in advance to all that help with this one.
    I have a lisp program that use on every drawing, its my os1 lisp (osnaps). My problem is that when i execute another lisp program, my osnap lisp turn off and i have to invoke the os1 again. Can I include my os1 lisp at the end of other lisp programs. I would like to have the os1 execute after other lisp program executes. I included a lisp program to draw T profile and the os1 lisp. I would like for the os1 to execute after the TEE Profile is executed, so that i don't have to execute the os1 every time i execute a lisp program.
    Attached Files Attached Files

  2. #2
    Certifiable AUGI Addict
    Join Date
    Tallahassee, FL
    Login to Give a bone

    Default Re: Help with autolisp (2 lisp programs in one lisp execution)

    (defun c:T-profile ( / osmode pt1 CL SH T1 T2 pt2 pt3 pt4 pt5 pt6 pt7 pt8)
     (command "._layer" "_M" "SECTION" "")
     (setq osmode (getvar "osmode" ))
     (setvar "osmode" 0)
     (Setq pt1 (getpoint "\nEnter the point: ") ;Starting point;
           CL (getdist "\nEnter the Cap length: ")
           SH (getdist "\nEnter the Stem Height: ") 
           T1 (getdist "\nEnter the Stem Thickness: T1 ")
           T2 (getdist "\nEnter the Cap Thickness: T2 ")
           pt2 (polar pt1 0 t1)
           pt3 (polar pt2 (/ pi 2.0) (- SH T2))  
           pt4 (polar pt3 0 (+(/ CL 2) (-(/ T1 2))))    
           pt5 (polar pt4 (/ pi 2.0) T2)
           pt6 (polar pt5 pi CL)  
           pt7 (polar  pt6  (/(* pi 3)2) t2) 
           pt8 (polar pt7 0 (- (/ CL 2) (/ T1 2)))
     (command "pline" pt1 pt2 pt3 pt4 pt5 pt6 pt7 pt8 pt1 "")
     (setvar "osmode" osmode)
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

Similar Threads

  1. open Drawing using AutoLISP and run lisp routine
    By avinash patil in forum AutoLISP
    Replies: 0
    Last Post: 2016-03-07, 10:51 AM
  2. Replies: 2
    Last Post: 2012-08-30, 11:59 AM
  3. Autolisp vs Visual Lisp
    By neje in forum AutoLISP
    Replies: 7
    Last Post: 2009-03-08, 10:54 PM
  4. SLOW execution of lisp in 2006...
    By rlarabee.89652 in forum AutoLISP
    Replies: 3
    Last Post: 2005-10-05, 05:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts