set folder location

set folder location

jostroopers
Collaborator Collaborator
541 Views
1 Reply
Message 1 of 2

set folder location

jostroopers
Collaborator
Collaborator

I want to save the parts in an assembly as a step file.
I want to store these step files in a specific folder at a location.
I have a code where the oPath was defined as :

oPath = ThisDoc.Path

but I want to change it to the folder: Z: \ Uni_Link \ Import \ Stepfiles
Can someone help me how to set that up correctly:

'- - - - - - - - - - - - -STEP setup - - - - - - - - - - - -
oPath = Z : "\" Uni_Link "\" Import "\" Stepfiles 
'get STEP target folder path
oFolder = oPath & "\" & oAsmName & " STEP Files"

'Check for the step folder and create it if it does not exist
If Not System.IO.Directory.Exists(oFolder) Then
System.IO.Directory.CreateDirectory(oFolder)
End If

  

Mvg Jos
Youre drawings are as good as the symbols that compleet them.....
0 Likes
Accepted solutions (1)
542 Views
1 Reply
Reply (1)
Message 2 of 2

jostroopers
Collaborator
Collaborator
Accepted solution

Ok, i found it myself in another code on the forum.

'- - - - - - - - - - - - -STEP setup - - - - - - - - - - - -
oPath = "Z:\Uni_Link\Import\Stepfiles"

And I am not allowed to use spaces between " " otherwise I will get an error. 

Mvg Jos
Youre drawings are as good as the symbols that compleet them.....