Batch file and Script to export to ifc

Batch file and Script to export to ifc

Anonymous
Not applicable
1,345 Views
3 Replies
Message 1 of 4

Batch file and Script to export to ifc

Anonymous
Not applicable

I would like to automate exporting of AS files to ifc so they can be imported into OpenBuildings. I have done a bit of researching and it seems that using a batch file to start AS and then use a script is quite possible. Though I have a problem with both.

When I run the batch file AS starts fine but then a dialog pops up with File not found. I assume this is referring to the dwg file not being found?

for %%f in ("\\bge.int\dfs\per\Projects\\01_Models\Structural\DGN\xcopy\*.dwg") do (
"C:\Program Files\Autodesk\AutoCAD 2019\UserDataCache\"
"C:\Program Files\Autodesk\AutoCAD 2019\acad.exe" /language "en-US" /product "ADVS" /p "<<ADVS>>" %%f /b "\\bge.int\dfs\per\Projects\01_Models\Structural\DGN\xcopy\EXPORTTOIFC.scr")

 If I browse to the file location the script executes and opens the IFC Export dialog. Is it possible to hit the OK button from the script?

_ASTOREXPORTTOIFC

 

0 Likes
1,346 Views
3 Replies
Replies (3)
Message 2 of 4

Sea-Haven
Mentor
Mentor

Rather than using BAT have a look at Autocad's script files or using Aeccoreconsole. 

0 Likes
Message 3 of 4

Anonymous
Not applicable

Are you able to pass Advance Steel commands into AcCoreConsole and if so how do I go about this?

0 Likes
Message 4 of 4

Sea-Haven
Mentor
Mentor

Make a test lisp for AS it can not have any user input must just run. Aeccorconsole runs a script but that can call a lisp.

 

Have you looked at OBDX working in another dwg check out Lee-mac.com.

0 Likes