Hi, Can you confirm that what you wrote are the actual commands? The line breaks seem off.
The usage should be: IfcConvert [options] <input.ifc> [<output>]
So in your case something like:
As for your second question, yes, it is possible for a single file, but currently requires changing this line https://github.com/IfcOpenShell/IfcOpenShell/blob/master/src/ifcconvert/IfcConvert.cpp#L52 and recompiling IfcConvert yourself. Better way would be to create a batch file, say ConvertToStep.bat, which would invoke IfcConvert and pass the desired parameters along with the input filename along.
Last edit: Stinkfist 2018-02-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Stinkfist! What I was doing wrong is typing the full path before test.ifc and test.igs. By following your example it worked out. Great!
Now for the batchconvert.. I am sorry but I do not understand what to do.
What do you mean by recompiling IfcConvert myself?
How do I create a .bat file? And how to pass parameters towards input and output ?
Is there also a way using command line inputs to batchconvert files?
I am sorry I am pretty newb to all this :) your help is much appreciated. many thanks.
Last edit: jnoordzij 2018-02-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A simple sketch for the batch file (create to the same folder where IfcConvert resides):
.\IfcConvert.exe %* output.stp
pause
%* means that all the arguments of the batch file are passed on as is. For multiple input files you need to break %* into multiple filenames and invoke IfcConvert with a unique output filename in a for-loop for each input file.
Last edit: Stinkfist 2018-02-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I copy paste these 4 cells into the cmd line at once then all 4 step files are created in 1 go :) yay!
Nevertheless I would still like to learn how to reach the same result using only commands/loops/batch files. If you have any advice on this, please let me know!
Last edit: jnoordzij 2018-02-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry about the late reply. Thomas is on the right track, although I did not quite manage to get this work, this should look like a decent starting point:
for %%f in ("%*") do call .\IfcConvert.exe "%%~f" "%%~nf.stp" --add-some-param-
-if-needed
In this version I'm trying to replace the file extension instead of simply appending it to the original filename. Breaking %* to multiple filenames didn't quite work, so if you figure that out, the script should work.
Last edit: Stinkfist 2018-03-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I tried the following two lines from command prompt
C:\PROXSYS\ifcconvert>ifcconvert.exe C:\PROXSYS\ifcconvert>test.ifc C:\PROXSYS\ifcconvert>test.igs
C:\PROXSYS\ifcconvert>ifcconvert.exe C:\PROXSYS\ifcconvert>test.ifc C:\PROXSYS\ifcconvert>test.stp
The test.igs and test.stp files are created. But... they're both 0 kb.
Am i doing something wrong?
.obj file was succesful !
Furthermore, is it also possible to batch convert a pile of ifc's to stp at once, by drag and drop onto the .exe?
Thanks .
Last edit: jnoordzij 2018-02-07
Hi, Can you confirm that what you wrote are the actual commands? The line breaks seem off.
The usage should be: IfcConvert [options] <input.ifc> [<output>]
So in your case something like:
As for your second question, yes, it is possible for a single file, but currently requires changing this line https://github.com/IfcOpenShell/IfcOpenShell/blob/master/src/ifcconvert/IfcConvert.cpp#L52 and recompiling IfcConvert yourself. Better way would be to create a batch file, say ConvertToStep.bat, which would invoke IfcConvert and pass the desired parameters along with the input filename along.
Last edit: Stinkfist 2018-02-07
Thanks Stinkfist! What I was doing wrong is typing the full path before test.ifc and test.igs. By following your example it worked out. Great!
Now for the batchconvert.. I am sorry but I do not understand what to do.
What do you mean by recompiling IfcConvert myself?
How do I create a .bat file? And how to pass parameters towards input and output ?
Is there also a way using command line inputs to batchconvert files?
I am sorry I am pretty newb to all this :) your help is much appreciated. many thanks.
Last edit: jnoordzij 2018-02-08
A simple sketch for the batch file (create to the same folder where IfcConvert resides):
%*
means that all the arguments of the batch file are passed on as is. For multiple input files you need to break%*
into multiple filenames and invoke IfcConvert with a unique output filename in a for-loop for each input file.Last edit: Stinkfist 2018-02-08
I'm sorry but I could use some more help with this.
Should it be like
with ConvertToStep.bat being your exact sketch?
Because that doesnt work. I get
Last edit: jnoordzij 2018-02-14
I've done something else now. I've used excel to create the commands using string concatenation:
ifcconvert.exe test1.ifc test1.stp
ifcconvert.exe test2.ifc test2.stp
ifcconvert.exe test3.ifc test3.stp
ifcconvert.exe test4.ifc test4.stp
When I copy paste these 4 cells into the cmd line at once then all 4 step files are created in 1 go :) yay!
Nevertheless I would still like to learn how to reach the same result using only commands/loops/batch files. If you have any advice on this, please let me know!
Last edit: jnoordzij 2018-02-14
Windows batch scripting is really not my expertise. Perhaps something like the following would work.
Sorry about the late reply. Thomas is on the right track, although I did not quite manage to get this work, this should look like a decent starting point:
In this version I'm trying to replace the file extension instead of simply appending it to the original filename. Breaking
%*
to multiple filenames didn't quite work, so if you figure that out, the script should work.Last edit: Stinkfist 2018-03-07