Can you put comments into a script file?

Discussion in 'AutoCAD' started by Doug, Jan 6, 2005.

  1. Doug

    Doug Guest

    Can you put comments into a script file? I'd like to keep a script template
    for updating title blocks with comments labeling each entry to simplify
    creting a new version of the script for a new change to a different area of
    the title block.



    DougVL
     
    Doug, Jan 6, 2005
    #1
  2. Doug

    Matt W Guest

    Yes.
    Use ";" like you would in LISP.
     
    Matt W, Jan 6, 2005
    #2
  3. Doug

    Doug Guest

    I'd be glad to share the script if anyone wants it, but I don't really want
    to change to LISP. Then I'm encroaching on the I.T. department's territory
    and that brings trouble.

    I have had another version, at another office, using Visual Basic with a
    dialog box to enter the changes I need and then generate the script
    automatically. But we don't have VB available here.
     
    Doug, Jan 6, 2005
    #3
  4. Doug

    Doug Guest

    Thanks!

    I had wondered about that. If I'd been thinking quicker, I would have just
    checked that first, instead of asking. But I'd just made another new
    posting or 2 and got carried away.

    Doug
     
    Doug, Jan 6, 2005
    #4
  5. Doug

    Tom Smith Guest

    Then I'm encroaching on the I.T. department's territory

    No offense, but whoever made it up, that's a really silly rule that
    demonstrates an ignorance of AutoCAD. Prohibiting customizations which will
    increase your company's productivity and profitability, because of a "turf"
    jealousy, is just plain dumb.

    AutoLISP is the "macro" language supplied supplied with Acad, it's specific
    to Acad, and doesn't run outside Acad. I seriously doubt that your IT people
    are programming in lisp, and if they were, it wouldn't be a dialect that's
    useful in customizing Acad. No matter how smart they are, if they aren't
    Acad users, I'd be very skeptical of their ability to write programs of
    benefit to you without spending an inordinate amount of time learning
    AutoCAD first.

    You're "programming" when you write a script and use it as a way to automate
    Acad. How is it any different to write a lisp in your text editor rather
    than a script? Your script will translate almost directly into a series of
    (command) function calls in lisp -- the same effect, just a change in
    syntax. The only difference is that this silly limitation prevents you from
    using logical techniques to vastly expand the power of the programming that
    you are already doing.

    I hope you find a different position some day, here your initiatve will be
    appreciated rather than discouraged.
     
    Tom Smith, Jan 6, 2005
    #5
  6. Doug

    Jim Claypool Guest

    Very well put. Tom.

     
    Jim Claypool, Jan 6, 2005
    #6
  7. Doug

    Tom Smith Guest

    Jim, I don't know the situation of course, but it just seemed absurd. A person who's taking the initiative to automate tasks ought to be encouraged, obviously within the reasonable bounds of not messing up company standards and so forth.

    In our outfit, IT does hardware and networking and the like, and aside from doing the raw install of vanilla Acad on new computers, they want nothing to do with it or how we use it. That's the exclusive domain of the architectural dept.
     
    Tom Smith, Jan 6, 2005
    #7
  8. Bravo Tom...!

    It remains me some similar situation.. many years ago, I end up moving to a new office...
     
    Luis Esquivel, Jan 7, 2005
    #8
  9. Doug

    Tom Smith Guest

    Luis, I think we have all been there.
     
    Tom Smith, Jan 7, 2005
    #9
  10. Doug

    Doug Guest

    Wait. I just remembered. I have already used ";" in scripts, to work as
    the ENTER key.

    Doug
     
    Doug, Jan 7, 2005
    #10
  11. Doug

    Tom Smith Guest

    Wait. I just remembered. I have already used ";" in scripts, to work as
    the ENTER key.

    No, you're thinking of menu macros. I did a quick test yesterday, and
    semicolons worked for commenting a script. It's good to know -- I had not
    needed that before.
     
    Tom Smith, Jan 7, 2005
    #11
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.