Getting Un-Saved ASsembly Doc Name (VBA)

Discussion in 'SolidWorks' started by What-a-Tool, May 5, 2005.

  1. What-a-Tool

    What-a-Tool Guest

    Created a macro that inserts a bunch of components into an assembly doc.

    Have 2 choices -
    Insert into New document
    Insert into Existing document

    In order to do this, the name of the assembly document is necessary. No
    problem with the existing assembly doc.(ModelDoc2.GetPathName).
    Can't use this to get the name of the unsaved assembly doc, and I don't want
    to have to save it before the components are inserted. Seem to remember
    getting the Window name before, but can't remember how and can't find any
    hints in API help.

    Someone give me a pointer please?
    Thanks in advance


    --

    / Sean Mc /


    "I have not failed. I've just found 10,000 ways that won't work."
    - Thomas Alva Edison (1847-1931)
     
    What-a-Tool, May 5, 2005
    #1
  2. If the file is not saved yet, you can use ModelDoc2::GetTitle.

    WT
     
    Wayne Tiffany, May 6, 2005
    #2
  3. What-a-Tool

    That70sTick Guest

    Files don't really have file names until they are saved, because they
    are not files until then :)

    "ModelDoc2::GetTitle" might be what you are looking for.
     
    That70sTick, May 6, 2005
    #3
  4. What-a-Tool

    What-a-Tool Guest

    ModelDoc2::GetTitle is just what I needed -
    Thanks for the replies

    --

    / Sean Mc /


    "I have not failed. I've just found 10,000 ways that won't work."
    - Thomas Alva Edison (1847-1931)
     
    What-a-Tool, May 6, 2005
    #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.