Help to find Clas to create a Block Definition in Autocad, Civil API

Ancient spirits of evil… ! Just Kiding.

Hola Amigos, Dynamers comunity i really need your help, in my company we are updating Autocad plug ins that still work in Lisp. :melting_face: (there are few users in the company that handle the language so we decided to migrate to C#), the weak point of the developers in the team is geometry so I had to make my debut coding and I managed to create something decent inside Dynamo to help them :face_with_peeking_eye: that’s why I’m trying to invoke people who have experience with the Autocad API to find the right class to create a new Block Definition (Back Ground) with this geometry my weak point is programming I have no experience reading the API’s documentation I’ve been looking for this class for a week, Auxilio porfavor!! :smiling_face_with_tear: I also leave you the Work flow that I have in mind as well as the example of my script, thank you in advance!


Either of these may help you, though creating blocks is probably part of the autocad API.

Autocad: Help
Civil 3d : Help

Yep in deed i’m looking there since a week, I have not been able to find the right class, thanks for the tip! :wink:

An AutoCAD database contains a table for all block definitions called the block table, and each entry in the table is called a block table record. That is the class to look at.

2 Likes

I Found it, i try to read it but i don’t understand any thing pero parece que es la adecuada, I think if I look at it with my fellow programmer we can get the script working in C#, I will test it during the week and I will publish the feed back, just to be sure can I use this class in Dynamo for testing or do I need to create a Zero touch adding the reference .dll’s to be able to use the class and its methods?

You can use a Python node to do it directly in Dynamo, but if you specifically want to use C# then you’ll need to create a DLL.

1 Like