LauRum Posted November 10, 2018 Share Posted November 10, 2018 I made a dialog were the User should push a button an browse for the desired folder and can type in the name of the file he wants to save. Is there something like a standard 'Save As Dialog' i can use that will return path and/or filename? I tried GetFileN but it'll only find existing files. thank you in advance! Quote Link to comment
Vectorworks, Inc Employee klinzey Posted November 12, 2018 Vectorworks, Inc Employee Share Posted November 12, 2018 Try "PutFile" Quote Link to comment
LauRum Posted November 12, 2018 Author Share Posted November 12, 2018 Thanks! That's what I was looking for. vs.PutFile(commentStr, defaultStr): return fileName returns a complete Path. Is there a known reason why i can't use vs.SaveActiveDocument(filePath): with this Path? I know I can't use SaveActiveDocument inside the Dialog, so I've put this line in the Main part, after the dialog is closed with OK. Quote Link to comment
_c_ Posted November 13, 2018 Share Posted November 13, 2018 Hello, speaking about SaveActiveDocument, this is from my own notes from VW 12 (now is 24, so it was 12 versions ago): It corresponds to "save as" but without dialog. Saving on the same file path name doesn't work (returns -1), only if the file path is different (returns 0). Quote Link to comment
_c_ Posted November 13, 2018 Share Posted November 13, 2018 Laurum, do you know our Developer wiki? It's great: http://developer.vectorworks.net/index.php/VS:SaveActiveDocument Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.