Is it possible to arrange x.lsp from y.lsp

Discussion in 'AutoCAD' started by Adesu, Feb 15, 2005.

  1. Adesu

    Adesu Guest

    I would create a file lsp,and special for arrange variable other file lsp,is
    it possible to do this?
    for example;
    I have a file ,like this

    (defun c:cd (/ olddimtxt olddimdec olddimtad olddimse1
    olddimse2 olddimexe olddimexo olddimgap
    olddimtih p1 p2 p3 p4 ent3 ent4)
    (setq oldosmode (getvar "osmode")) ; get osmode setting
    (setvar "osmode" 0) ; osmode set to 0
    (setq oldcmdecho (getvar "cmdecho")) ; get cmdecho setting
    (setvar "cmdecho" 0) ; cmdecho set to 0
    (setq olddimtxt (getvar "dimtxt")
    olddimdec (getvar "dimdec")
    olddimtad (getvar "dimtad")
    olddimse1 (getvar "dimse1")
    olddimse2 (getvar "dimse2")
    olddimexe (getvar "dimexe")
    olddimexo (getvar "dimexo")
    olddimgap (getvar "dimgap")
    olddimtih (getvar "dimtih")
    oldfilletrad (getvar "filletrad")
    olddimblk (getvar "dimblk")
    olddimasz (getvar "dimasz")
    olddimlim (getvar "dimlim")
    olddimtm (getvar "dimtm")
    olddimtol (getvar "dimtol")
    olddimtdec (getvar "dimtdec"))
    (setvar "dimtxt" 1) ; set text height
    (setvar "dimdec" 2) ; set decimal
    presicion
    (setvar "dimtad" 1) ; set vertical
    position
    (setvar "dimse1" 0) ; set Suppresses
    display of the first extension line
    (setvar "dimse2" 0) ; set Suppresses
    display of the second extension line
    (setvar "dimexe" 1) ; set Specifies how
    far to extend the extension line beyond the dimension line
    (setvar "dimexo" 1) ; set Specifies how
    far extension lines are offset from origin points
    (setvar "dimgap" 1) ; set Sets the
    distance around the dimension text when the dimension line breaks to
    accommodate dimension text
    (setvar "dimtih" 0) ; set Controls the
    position of dimension text inside the extension lines for all dimension
    types except ordinate
    (setvar "filletrad" 3) ; set radius of
    follet
    (setvar "dimblk" "_open") ; set style arrow
    (setvar "dimasz" 1) ; set arrow size
    (setvar "dimlim" 1) ; set limit
    (setvar "dimtm" 5) ; set lower limit
    (setvar "dimtol" 1) ; set limit
    (setvar "dimtdec" 0) ; set limit
    presicion
    (prompt "\ndim(L)inear or (F)illet or dim(R)adius")
    (initget 1 "L F R")
    (setq mea (getkword "\nENTER PURPOSE OF MEASURING <L / F OR R>: "))
    <snip>

    Then ,I create a file lsp special to arrange ,we give a name as "Test.lsp"
    the scenario is
    (setvar "dimtxt" 1) >>>>>>Variable "dimtxt" can be set by Test.lsp
    (setvar "dimdec" 2) >>>>>>Variable "dimdec" can be set by Test.lsp
    etc.....
     
    Adesu, Feb 15, 2005
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.