VBA - Change the path of the Save As window automatically?

Hello 

I am starting this conversation to find out if it is possible using the save as command, to open the window directly in a specified link, the goal would be to retrieve the first link that the user specifies for the first part and not that of the source part for the parts to follow! 

bool = swmodel. Extension.RunCommand(SwCommands.swCommands_SaveAs, "")

Thank you for your help! 

Hello

I'm not sure if it's possible, but you can look at this side:

https://forum.solidworks.com/message/110356#110356

If not, maybe this command can work:

swApp.SetCurrentWorkingDirectory "D:\YOUR FOLDER\SUBFOLDER" 'your way

 

swApp.RunCommand SwCommands.swCommands_Saveas, ""

 

See also:

https://forum.solidworks.com/thread/112034

 

The only problem that stands in the way of the save as command is the PDM, which generates a part number for me, without going through this windows window the part number will not be generated..  

Otherwise I thought of copying the link to the clipboard and therefore pasting it into the field as I know the links..  

Is this possible?

Yes, if you want to copy a link to the clipboard (like a CTRL C), it's possible like this (but it doesn't look that easy!)  :

http://excel-macro.tutorialhorizon.com/vba-excel-putting-text-in-the-windows-clipboard/

Or see also:

http://www.thespreadsheetguru.com/blog/2015/1/13/how-to-use-vba-code-to-copy-text-to-the-clipboard

 

But this command should display the dialog box:

swApp.RunCommand SwCommands.swCommands_Saveas, ""

Have you tried it?

I can copy it but paste it in the place of the window dedicated to that I don't know the instruction.

Ah, sticking it I don't think it's possible... When you have opened the window, the macro code pauses, and wait for you to close the window to continue it seems to me.

Ok, thank you:)