Results 1 to 3 of 3

Thread: having problems with setting orthmode in lisp routine.

  1. #1
    Member
    Join Date
    2002-11
    Posts
    42
    Login to Give a bone
    0

    Default having problems with setting orthmode in lisp routine.

    i have been trying to get this line of code to work.The first line of code wroks without crashing. It sets the ortho but at the wrong time. the second line causes the program to crash. this is a line from a larger routine the entire code is atached. What do i need to do to make this work?

    (command "pline" pause (setvar "orthomode" 1) pause pause "" "");this works

    (command "pline" pause pause (setvar "orthomode" 1) pause "" "");does not work
    Attached Files Attached Files

  2. #2
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473
    Login to Give a bone
    0

    Default Re: having problems with setting orthmode in lisp routine.

    This may get you going, but it's quick and dirty, as I didn't have a lot of time to spend on it.

    Code:
     
    (defun c:gl ()
    ;  (initerr) ;<--commented for testing purposes only; function not tested
      (setvar "cmdecho" 1) ;<--added to have command prompts in pline, insert and dtext 
    ;commands, otherwise the user doesn't know what's going on unless you give them prompts
      (setvar "orthomode" 0);<<--Extra quote removed
      (command "-style" "notes" "romans.shx" "4.75" "0.85" "10" "n" "n" "n");<-Don't forget the leading 
    ;0 in reals < 1.0 IE: 0.85 not .85
      (setvar "osmode" 512)
    ;  (command "-insert" "grabm" pause "" "" pause);<--commented for testing purposes; I didn't 
    ;take time to create a block
      (command "pline" pause pause);<-- you can continue a command later by calling the 
    ;command function again as long as you don't execute a diffrent command in between
      (setvar "orthomode" 1)
      (command pause "");;<<--moved pause and removed extra "enter" (""); finishes up the pline 
    ;command
      (setvar "osmode" 0)
      (command "dtext" pause "0");are you manually placing the text insertion point?
    ;(reset) ;<--commented for testing purposes only; function not tested
    (princ)
    )
    Also, a lot of people have spent a lot of time on routines similar to this. Have you looked in
    the Archive to see if there is something you can use, or get ideas from?

    Take care,

  3. #3
    Member
    Join Date
    2002-11
    Posts
    42
    Login to Give a bone
    0

    Default Re: having problems with setting orthmode in lisp routine.

    thanks i looked at a lot of different web sites and things for ideas. i eventually worked out the solution.turns out it was he same as yours. thanks for the help.

Similar Threads

  1. 3DPOLY Lisp routine problems....
    By cstark804917 in forum AutoLISP
    Replies: 1
    Last Post: 2013-05-02, 07:22 AM
  2. Help with a lisp routine to add a 12" line to this routine
    By Orbytal.edge341183 in forum AutoLISP
    Replies: 3
    Last Post: 2012-11-14, 10:33 PM
  3. Combine three lisp routine into one routine.
    By BrianTFC in forum AutoLISP
    Replies: 1
    Last Post: 2012-02-08, 12:14 PM
  4. Replies: 9
    Last Post: 2012-01-21, 07:58 AM
  5. Replies: 2
    Last Post: 2006-08-17, 07:39 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
  •