File name of a new file before saving

Discussion in 'SolidWorks' started by Wayne Tiffany, Jul 13, 2004.

  1. I notice that the method ModelDoc2.GetPathName () returns an empty string if
    the file hasn't been saved yet. Ok, I understand that - no save, no path.
    But then how do I assign a config specific custom property of the Mass to a
    part that hasn't yet been saved? If you do it manually, SW puts in the mass
    property such as "SW-mass@@". How do I capture the
    "Part2.sldprt" without using the GetPathName?

    WT
     
    Wayne Tiffany, Jul 13, 2004
    #1
  2. Try Part::GetTitle
     
    Corey Scheich, Jul 13, 2004
    #2
  3. Hmm, interesting. That worked and built the mass property properly for it
    to evaluate to a value. But when I then saved the file, it didn't update
    that property to the new name as it does when you do it manually.

    WT
     
    Wayne Tiffany, Jul 13, 2004
    #3
  4. Now it seems to be doing something a bit different, but I maybe also didn't
    notice it. When I run the program on a brand new part, it picks up the
    title, but doesn't evaluate the string as the mass because the title doesn't
    come in with the file extension on it. Back to the drawing board.

    WT
     
    Wayne Tiffany, Jul 13, 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.