custom button/menu item for opening dwg

Discussion in 'AutoCAD' started by Jeff, Oct 11, 2004.

  1. Jeff

    Jeff Guest

    I would like to create a custom button and/or menu item that opens a
     
    Jeff, Oct 11, 2004
    #1
  2. Jeff

    Simon Wegner Guest

    Set filedia to 0 to open on the command line.

    Simon
     
    Simon Wegner, Oct 11, 2004
    #2
  3. Jeff

    Jeff Guest

    then what? How do I send the file name and location to the command line
    from a button?
     
    Jeff, Oct 11, 2004
    #3
  4. Jeff

    Tom Smith Guest

    Put the following on your button with the appropriate filename.

    ^C^C._VBAStmt AcadApplication.Documents.Open
    "d:/folder/folder/folder/drawing";

    Not understanding your purpose, I still think that customizing a toolbar
    button to open only one particular drawing is a vary strange way to do
    things. As I said elsewhere, using the built-in capabilities in the Open
    dialog is simpler and more flexible as a way to get to frequently used
    places witrhout navigation.
     
    Tom Smith, Oct 11, 2004
    #4
  5. Jeff

    Jeff Guest

    thanks again. That was exactly what I needed.

    As far as purpose..Like almost everything else in autocad, there are at
    least 3 ways to do the same thing. If providing that button for someone
    results in improved drawings...my life is that much easier.
     
    Jeff, Oct 11, 2004
    #5
  6. Jeff

    Tom Smith Guest

    my life is that much easier.

    My main reservation is, you introduce the idea that having a button is a
    cool way to open a drawing, you could be condemning yourself to making
    individual buttons for people forever, one per drawing. There are an
    infinity of drawings possible, and if the drawing ever gets relocated,
    you'll have to reprogram the button.

    My secondary reservation is, unless there is a rock-solid functional (not
    preferential) reason, I try as hard as possible not to reprogram the basic
    Acad interface. You open files with Open, start a new one with New, and so
    forth. There's a lot of customizability built into these interfaces, and
    they can certainly do what you want here, though maybe not "literally" the
    way the user requested it.

    This kind of thing has a way of coming back to bite you, either in the next
    version where you have to recreate every little thing you did on a
    one-on-one basis, or (worse still) 2 or 3 versions from now, when the users
    have become completely locked into using the custom widget instead of the
    standard widget, and all of a sudden the custom thing simply can't be done
    anymore, for whatever reason, and the users have lost all touch with the
    standard ways of working. Then it becomes your fault that they don't like
    the standard interface and you can't get back their old favorite kludge from
    a past version.

    Not to overdramatize, but I've seen it happen. Anything that smacks of
    reprogramming the standard interface automatically raises a great big red
    flag for me, based on experience, and I approach it very very cautiously.

    I'd teach the user to drag a shortcut into the "personal" area of the
    standard "open" dialog, and let him modify and maintain that set of
    shortcuts by himself, thereby leaving you alone whenever he decides he wants
    a new "button" for a file.
     
    Tom Smith, Oct 11, 2004
    #6
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.