DWGProps General Tab

Discussion in 'AutoCAD' started by Max, Jul 9, 2004.

  1. Max

    Max Guest

    Hi

    When running the _DWGPROPS command.

    How can I make it so that it shows up on the General Tab...Instead of the
    Summary Tab.

    Thanks for the help
     
    Max, Jul 9, 2004
    #1
  2. Max

    James Murphy Guest

    Max,
    This might be what you want
    (vl-file-size (getvar "dwgname"))
    It returns the current dwg file size in bytes

    Murph
     
    James Murphy, Jul 10, 2004
    #2
  3. Max

    Max Guest

    Hi

    How do I make this run?

    Thanks for the help!

    Max
     
    Max, Jul 10, 2004
    #3
  4. Max

    James Murphy Guest

    You can either type it in at the command line the way it is or if you know
    how to create a toolbar button that would be the macro for it. Keep in mind
    that it will return the file size back on the command line in bytes not
    Kilobytes.

    Murph
     
    James Murphy, Jul 11, 2004
    #4
  5. Max

    Max Guest

    Hi Murph

    I tried (vl-file-size (getvar "dwgname")) at the command line and i got...

    Command: (vl-file-size (getvar "dwgname"))
    nil
    Command:

    I am running AutoCAD 2004

    Thanks for the help.
     
    Max, Jul 11, 2004
    #5
  6. Max

    James Murphy Guest

    It works for me in R2004, you do have a dwg file open right? Also see if
    running this first works (vl-load-com) if it does then just add that to the
    macro or better yet in your acaddoc.lsp

    Murph
     
    James Murphy, Jul 11, 2004
    #6
  7. Max

    Max Guest

    (vl-load-com) that's got er....

    Thanks!


     
    Max, Jul 11, 2004
    #7
  8. Max

    Max Guest

    interesting...now, after I added it too my menu and ran it returned nil
    again...

    Command:
    Command: (vl-load-com)

    Command: (vl-file-size (getvar "dwgname")) nil

    I then typed it in and it still gave me nil....

    I shut down ACAD and did it again and no luck....kinda strange...
     
    Max, Jul 11, 2004
    #8
  9. Max

    zeha Guest

    Max, you tried it on a none existing file

    if so use a existing file or use below

    (if (findfile (getvar "dwgname"))(vl-file-size (getvar
    "dwgname"))(alert (strcat "Not existing file <"(getvar "dwgname")"> ")))

    I now thats not the answer but i think i'ts complicated to use the DWGprops

    Look also in the news group ther many examples.

    Cheers
     
    zeha, Jul 12, 2004
    #9
  10. Max

    Max Guest

    Hi

    I tried your suggestion too...(with an existing file)

    but i am getting nil....
    Command: (if (findfile (getvar "dwgname"))(vl-file-size
    (getvar"dwgname"))(alert (strcat "Not existing file <"(getvar "dwgname")">
    ")))
    nil

    Thanks for the help....what is weird it did work once but can't seem to make
    it work again...I didn't change none of settings or installed anything on my
    machine.
     
    Max, Jul 12, 2004
    #10
  11. Max

    James Murphy Guest

    Have you tried it with this first?
    (vl-load-com)
    If that was the one time that it worked then you need to include that either
    with the expression or add that line to your startup to run each time you
    open a dwg. Look up that function (vl-load-com) in the help files along with
    the vl-XXXX functions.

    Murph
     
    James Murphy, Jul 13, 2004
    #11
  12. Max

    zeha Guest

    Question

    return's

    (findfile (getvar "dwgname"))

    and

    (getvar "dwgname")

    the same result??

    if not

    try this one

    (if (findfile (getvar "dwgname"))(vl-file-size (findfile (getvar
     
    zeha, Jul 13, 2004
    #12
  13. Max

    Max Guest

    Yes i tried it first then proceeded with the second command and
    nothing...kinda strange...

    Thanks for the help...
    the suggestion
    (if (findfile (getvar "dwgname"))(vl-file-size (findfile (getvar
    "dwgname")))(alert (strcat "Not existing file <"(getvar "dwgname")" ")))
    by ZEHA
    worked!....

    Thanks for the help...

    8)
     
    Max, Jul 13, 2004
    #13
  14. Max

    Max Guest

    Thanks that worked....

    8)


    ")))
     
    Max, Jul 13, 2004
    #14
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.