Getting Un-Saved ASsembly Doc Name (VBA)

May 05, 2005 3 Replies

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



If the file is not saved yet, you can use ModelDoc2::GetTitle.

WT

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.

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

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required