Help VB or VVBA

Discussion in 'AutoCAD' started by Sebastião Velasquez, Feb 28, 2004.

  1. I need help.
    I don't have experience with VB or VBA.
    And I have to solve the problem below.

    Working with (setq JoyObj (vlax-Create-Object "
    Scripting.FileSystemObject"))
    and (setq JoyFile (vlax-invoke-method joyobj ' GetFile "
    c:\\autoexec.bat"))
    I get
    #<VLA-OBJECT IFile 01f36c38>
    Using the function below I get

    (defun JoyFileDate (obj /)
    (setq JoySize (vlax-variant-value (vlax-get-property JoyFile 'Size)))
    (setq dateC (vlax-get-property JoyFile 'DateCreated))
    (setq dateLA (vlax-get-property JoyFile 'DateLastAccessed))
    (setq dateLM (vlax-get-property JoyFile 'DateLastModified))
    ) ;_ fim de defun

    _$ joysize
    230
    in Bytes
    ;;;_$ dateC
    ;;;37834.5
    ;;;_$ dateLM
    ;;;38001.7
    ;;;_$ DateLa
    ;;;38036.0

    How to convert DateC DateLA DateLM values for the pattern
    Friday, August 1 of 2003 11:27:42
    or 01/08/2003 11:27:42
    or 08/01/03 11:27:42

    Thank you very much
    Sebastião Velasquez
     
    Sebastião Velasquez, Feb 28, 2004
    #1
  2. Sebastião Velasquez

    Jeff Mishler Guest

    The date returned is based on Jan. 1, 1900. Send vars to this function to
    return the Calender date.

    (defun ser2cal (serdate)
    (menucmd
    (strcat "M=$(edtime,"
    (rtos (+ serdate 2415019) 2 8)
    ",DDD\",\" DD MON YYYY hh:mm)"))
    )

    examples:
    _$ (setq datec 37834.5)
    37834.5
    _$ (ser2cal datec)
    "Fri, 01 Aug 2003 12:00"
    _$ (setq dateLM 38001.7)
    38001.7
    _$ (ser2cal dateLM)
    "Thu, 15 Jan 2004 16:48"
    _$

    HTH,
    Jeff
     
    Jeff Mishler, Feb 28, 2004
    #2
  3. Sebastião Velasquez

    Anne Brown Guest

    Hi Sebastiao -

    This discussion group is designed for Lisp questions. In addition
    to any replies you might receive or have already received, you
    may find more information or responses by posting VBA related
    questions in the following discussion group:

    Web browser: http://discussion.autodesk.com/forum.jspa?forumID=33
    Newsreader:
    news://discussion.autodesk.com/autodesk.autocad.customization.vba
     
    Anne Brown, Feb 29, 2004
    #3
  4. The name doesn't actually imply anything about lisp!
    Only about customization. Perhaps you should consider renaming it?
    I know, I know.......
     
    Allen Johnson, Mar 1, 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.