Matlab & Scripts

Discussion in 'AutoCAD' started by scott_hicks, Jul 1, 2004.

  1. scott_hicks

    scott_hicks Guest

    Anyone out there use Matlab to write script files? If so, I am curious to hear of any on-line resources or already written routines.

    (I am just learning to lisp, so I need the crutch of another programming language to get me through some automations...plus the way Matlab handles large data sets is quite handy).

    Just curious...
     
    scott_hicks, Jul 1, 2004
    #1
  2. scott_hicks

    devitg Guest

    script is not lisp

    What do you want to do??
     
    devitg, Jul 2, 2004
    #2
  3. scott_hicks

    scott_hicks Guest

    Yeah, I realize that scripts are not lisp. Lisp is an Autocad programming language, right? Unfortunately, my knowledge of it is quite limited. But I do know other programming languages, so my solution to get the products that I need has been to craft an a third party routine to write a script. Within that routine, I can use variable, make calculatons, etc. While I am sure that it is not quite as useful as a full command of lisp, it is the best I can do to produce a product with out investing a lot of time to learn a new language.

    In this case, I have written code/script to take a large number of velocity vectors in the x and y direction, calculate the resultant magnitude and direction and then plot those at their proper geographic coordinate. I also wanted it to save each 5 or 10 velocity measurements to a seperate layer and save the individual layers as a bmp (which I will import into a third party software to make a mini movie depicting the changes in velocities over time).

    I guess my purpose of my post, was to see if many other people 'customize' autocad in this manner. Any other language should work, as long as it is capable of generating a text file. Matlab is just a derivative of C which has the advantage of manipulating large data sets very quickly and easily, many times without needing to setup loops.

    Just curious...

    Cheers,
    Scott

    I guess the purpose of my post was to
     
    scott_hicks, Jul 2, 2004
    #3
  4. scott_hicks

    devitg Guest

    Hi Scott , is a cuestion of words.
    Script is a way to handle Acad , Lisp is a way to programming ACAD.
    Script is usefull when you do repetive task on files ,
    it can be used to to draw from a excell file too
    SCRIPT is esy to do just tipe the same so would type on the keyboard.
    example to do a line

    save a file named line.scr in text format.

    line
    0,0
    1,0
    1,1
    0,1
    c

    now on the command line type script

    it will ask for a file
    type line

    and the box 1 unit wide will be drawn

    But the better way to do it is by lisp

    The best way to make a lisp by a third one, is to have a total description or a drawing as it is wanted to be.

    Even the calcs can be done in LISP .

    If you want, please send me such description and sample drawing.
    mi e mail is
     
    devitg, Jul 2, 2004
    #4
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.