How to set a file path for exporting DXF/ Step files

How to set a file path for exporting DXF/ Step files

roy7BB24
Advocate Advocate
354 Views
2 Replies
Message 1 of 3

How to set a file path for exporting DXF/ Step files

roy7BB24
Advocate
Advocate

Hi All

Currently working on a script to automate all of my exports (DXF's, Step files etc.) at the end of a job. I've looked at the two examples below, I'm reasonably confident I can adapt everything from there to suit my needs. The only thing I'm unsure on is I would like to set the folder all of these files are exported to. Ideally it would be some kind of save as window or the like where I can browse to the folder, I want them all dropped in run the script from there. Anyone able to point me in the right direction to get started on this?

Solved: How to create flat patterns and export them to DXF from assemblies - Autodesk Community - In...

Solved: Upgrading Export DXF flat pattern from Assembly with iProperty naming - Autodesk Community -...

 

Kind Regards

 

Roydon Mackay

0 Likes
Accepted solutions (1)
355 Views
2 Replies
Replies (2)
Message 2 of 3

vpeuvion
Advocate
Advocate
Accepted solution

Hi, can you try this :

Sub Main()
	Dim oFoldBrowsDialog As New FolderBrowserDialog()
	If oFoldBrowsDialog.ShowDialog() = DialogResult.OK Then
    	Dim Path As String = oFoldBrowsDialog.SelectedPath & "\"
		MessageBox.Show(Path)
	End If
End Sub	

This fills the Path variable, all you have to do is add the file name.

Hope this will help you.

Vincent.

0 Likes
Message 3 of 3

roy7BB24
Advocate
Advocate

Cheers, this has worked a treat, thanks for the assistance

 

Kind Regards

 

Roydon Mackay