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

ilogic command to search for files

  • Thread starter Thread starter Matteo Cappelli dis.CAD
  • Start date Start date

Matteo Cappelli dis.CAD

Guest
Hello everyone
I have the following question:
with this macro ilogic, copy the files saved by inventor (.idw) in autoca dwg from one folder to another
since, some have multiple sheets, relative dwg, are saved with suffix "_foglio_1.dwg" , "_foglio_2.dwg" etc...


if (system.io.file.exists(folder_location & shortname & revision & "_foglio_1.dwg") then
filecopy (folder_location & shortname & review & "_foglio_1.dwg", folder_order & shortname & review & "_foglio_1.dwg")
end if
if (system.io.file.exists(folder_location & shortname & revision & "_foglio_2.dwg") then
filecopy (folder_location & shortname & review & "_foglio_2.dwg", folder_order & shortname & review & "_foglio_2.dwg")
end if


So... No sheets... n command lines

there is a sort of search with the wildcard characters of the old dos (of the type "*") so as to obtain a single command line

example, if there are "101010*.dwg" code files, please copy from "to" folder to "b" folder

Thank you.
 
ilogic I don't use it and I don't know how to tell you, but you could create a cycle that automatically checks you, like
Code:
dim myfile as string
dim mysheet as string
dim i as integer
dim issheetmissing as boolean

i = 1
myfile = "c:\pippo"
do
	mysheet = myfile & "_foglio_" & i & ".dwg"
	
	'-------------------------------------
	' controlla se esiste il mysheet
	' ------------------------------------
	if (system.io.file.exists(mysheet)) then	
		issheetmissing = false
		' fai la copia
	else
		issheetmissing = true
	end if
	i += 1
loop while issheetmissing
 
thanks for celerity

it worked (creating the copy in the preset folder) but inventor went the loop and I had to lock it
If I don't run, you don't have to add a control (eg. i=5), go out otherwise continue looking for files
Right?

Thank you
 
I would say that just put loop until instead of loop while (I always exchange them!);
when missing the issheemissing file becomes true and comes out of the cycle...
 
you can also use ilogic design copyildc.webpyou choose the project and the files contained to copy then you choose the destination folder
 
Hi.
looking at the video contained in the help, it seems to me to be traceable to design assistant, to try if it is faster (surprised when the files are on the net and many!)

However my need was slightly different, or exporting the idw table in autocad dwg, dxf and pdf formats, such files are moved from the 3d folder to the production folder automatically via ilogic rule launched from the inside of the current axieme

thanks to all
 

Forum statistics

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

Members online

No members online now.
Back
Top