acet functions

Discussion in 'AutoCAD' started by Greg H, Apr 27, 2004.

  1. Greg H

    Greg H Guest

    Anyone know where I can find information on all the acet functions? eg.
    acet-file-attr
    Thanks
     
    Greg H, Apr 27, 2004
    #1
  2. <opinion>

    There is a lot of really great stuff in the acet lib(s).

    Which is precisely why I think you should avoid them.

    Eh? Come again?

    You simply cannot rely on them being available on a given
    pc. Sure, at your current company, given its current
    licensing state you may have access to said tools
    legitimately, but 6 months from now, a year from now your
    licensing may be different, you may be at a different
    company, you may be authoring works as a third party
    developer ... and those libraries will not be available to
    you or your clients.

    Thus, if you build an application or library upon the acet
    libs you are designing imminent failure right into your
    product(s).

    Solution: Roll your own (best) or use libraries that have
    a more reasonable chance of being globally and legally
    available, e.g. DOSLIBS.

    Sincerely,

    M.

    </opinion>.

    Anyone know where I can find information on all the acet functions? eg.
    acet-file-attr
    Thanks
     
    michael puckett, Apr 27, 2004
    #2
  3. Oops: replace imminent with future.


    <snip>

    Thus, if you build an application or library upon the acet
    libs you are designing imminent failure right into your
    product(s).

    </snip>.

    Anyone know where I can find information on all the acet functions? eg.
    acet-file-attr
    Thanks
     
    michael puckett, Apr 27, 2004
    #3
  4. Greg H

    Joe Burke Guest

    Joe Burke, Apr 27, 2004
    #4
  5. Some of what you might use acet-* functions for
    are available using other means (for example,
    you can use Windows scripting host to get info
    on files including attributes):

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;
    ;; (GetFileAttrib <filepath>)
    ;;
    ;; Returns the file system attributes for
    ;; the specified file.
    ;;
    ;; caveats:
    ;;
    ;; 1. Required error checking is not done.
    ;;
    ;; 2. Designed for casual use. For getting
    ;; the attributes of many files, this is
    ;; definitely the wrong approach.

    (defun GetFileAttrib(name / wsh file attributes)

    (setq wsh
    (vla-getInterfaceObject
    (vlax-get-acad-object)
    "Scripting.FileSystemObject"
    )
    )

    (setq file
    (vlax-invoke-method
    wsh
    'GetFile
    name
    )
    )

    (setq attributes
    (vlax-get-property file 'Attributes)
    )

    (vlax-release-object file)
    (vlax-release-object wsh)

    attributes

    )

    Bear in mind that this requires the system to
    have the Scripting.FileSystemObject installed,
    but nowadays, that's fairly likely. A general
    check for its presence would be prudent during
    loading or installation of your code, if you
    can't be certain that it's installed.
     
    Tony Tanzillo, Apr 28, 2004
    #5
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.