• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

search and find folder with ilogic

  • Thread starter Thread starter Matteo2253
  • Start date Start date

Matteo2253

Guest
good morning to all, I'm just trying with ilogic getting discreet results but I find myself in difficulty with a rule. the problem is this: I have to convert an idw to dwg and save it to a folder, and so far nothing strange. the fact is that the folder varies from time to time, so I used a data input to get a value I need to "build" the path. the fact is that the final folder begins with the value I bet, but then it contains "n" different characters for each folder. I make a simple example:

- 001 gfdfhd
- 002 gffdgfh
- 003 days
- 004 jgoltoj

in practice with the input text coming up to the first part of the folder, which is well defined. the second part instead by force of things I cannot enter it because not known a priori.
Is there a way to use wildcard characters in creating the folder path? For example if I have to save the dwg in the second folder on the list above, I should have a code similar to:

text_immissed = inputbox("prompt", "title", "default entry") where I admit, in this case, 002
path_fold = "c:\windows\" & text_immitted & " [Bleep] "Save the file in the folder that "start with" 002

I'm sure the asterisks don't work, but I hope I made the idea...
Has anyone ever faced such a problem?
Thank you.
 
Good
I use a rule to create folder with drawings to send to the supplier, the place maybe there is something that can serve you, in the name of the folder I admit the order number that every time is different.

(')
Basic route
opath = "c:\users\documents\dis to be sent\exported automatically\pdf"
ofilename = thisdoc.filename(false) 'without extension
'ilogicform.show("num_ord", formmode.nonmodal)
' creates parameter with what you want to insert
parameter("ord_num")=parameter("num_ord")
' copy the value in the custom property
iproperties.value("custom", "number")="ord n°" & " & parameter("num_ord")

' Creates folder with custom value added
if msgbox("you want to create a crtella ? ", vbyesno + vbquestion) = vbyes then
ofolder = left(opath, instrrev(opath, "\")) & iproperties.value("custom", "number")
'' check for the pdf folder and create it if it does not exist
if not system.io.directory.exists(ofolder) then
system.io.directory.createdirectory(ofolder)
end if
end if
?
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top