File name of a new file before saving

Jul 13, 2004 3 Replies

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@@ snipped-for-privacy@Part2.SLDPRT". How do I capture the "Part2.sldprt" without using the GetPathName?



WT


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

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

the

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required