To me it is unclear how much this aligns with the license agreement, as that dll isn’t included as a documented API… well not directly anyway. Generally you’re fine to experiment, but don’t put anything into production, and certainly don’t build any distributed tools (paid or not) just yet.
I’m only wanting to clean up some incoming CAD so I can import into Revit as a base for us to draw our model over.
I mean, currently we sometimes get JPEGs as floor plans… Soooo…
Another option is to use Dynamo (Revit Python) to run LISP inside AutoCAD, if you happen to know that, I certainly struggled!
Product team didn’t get to confirming licensing concerns for me, but advised that there are significant stability concerns if called in the same process as Revit, as there are a lot of ways where you interact with that library which will crash Revit or corrupt data (DWG or RVT), and so calling it out of process (not via Dynamo or other Python scripting tools) is advisable.
The reaction was more or less “maybe you could, but from a stability standpoint you’re better off opening AutoCAD and sending the command from there”.
Would there be license concerns if you had the AEC collection or only if you were a standalone Revit purchaser?
I am not a lawyer, nor am I in license compliance, so you should consult your independent council on anything compliance related.
But generally speaking the software terms enable you to utilize them for their intended purpose. So if the intent of application A isn’t to allow you to utilize the bulk of application B api, then you might not be in compliance. If however application B’s api is intended to be utilized and accessible, you are all set.
I assume that the dll is used by Revit when importing and exporting dwgs and dxfs. My experience is that the API can be unstable in AutoCAD or Revit and most of it stems from operating on the drawing database outside of a transaction or knowing to set variables like HostApplicationServices.WorkingDatabase
when using the layout manager or aligning text. In terms of licencing we are only using it internally.
I use the API specifically because of the short comings of Revit’s Exporter and providing the ability of our Revit users to clean up dwgs for issue to client standards. It’s also easier for access to Revit parameter values for populating block attributes - something I think Revit should do OOTB
I would suggest using the console version of AutoCAD (accoreconsole.exe
) to process files with LISP and a batch script - bit off this forum’s topic but here’s a DOS script to process all dwgs in a folder. Copy it to the folder with the target dwgs and it will run the script located in another folder. Change to the ACAD version to what is installed
@ECHO OFF
SET batpath=%~dp0
@ECHO ON
FOR %%f IN (%batpath%*.dwg) ^
DO "C:\Program Files\Autodesk\AutoCAD 2020\accoreconsole.exe" ^
/i "%%f" ^
/s "C:\CAD\my_processing_script.scr" ^
/isolate %username% %batpath% ^
| >> batchlog.log
EXIT