How to Identify and Extract Holes Data from Slab in AutoCAD Architecture Drawing Using .NET API?

How to Identify and Extract Holes Data from Slab in AutoCAD Architecture Drawing Using .NET API?

ramesh_choudhari
Enthusiast Enthusiast
537 Views
2 Replies
Message 1 of 3

How to Identify and Extract Holes Data from Slab in AutoCAD Architecture Drawing Using .NET API?

ramesh_choudhari
Enthusiast
Enthusiast

Hello everyone,

I'm currently working on a project where I need to programmatically identify and extract information about holes placed within a slab in AutoCAD Architecture drawings using the .NET API.

Specifically, I need to:

  1. Identify the presence of holes within a slab object.
  2. Extract relevant data about these holes such as their coordinates, dimensions, and any associated attributes.

Sample Drawing:

ramesh_choudhari_0-1717409239482.png

 

Inner rectangle is hole for that slab.

Could someone please provide guidance or code snippets on how to achieve this using the AutoCAD .NET API? Any insights, resources, or sample code would be greatly appreciated.

Thank you in advance for your help!

0 Likes
Accepted solutions (1)
538 Views
2 Replies
Replies (2)
Message 2 of 3

Gepaha
Collaborator
Collaborator

I could be wrong but I don't think there is an exposed method to obtain the holes in the slab directly.
Perhaps this link is a starting point.

https://www.theswamp.org/index.php?topic=41272.msg478708;topicseen#msg478708

0 Likes
Message 3 of 3

Gepaha
Collaborator
Collaborator
Accepted solution

I think it is possible to obtain the area of ​​the holes through "SlabLoop". If id = 1 then it is the slab itself if id > 1 then it is the holes. The area of ​​the slab itself is positive and the area of ​​the holes is negative.
The edges of the holes can be obtained using "SlabLoop.Edges".
I don't know what the purpose of this is, but don't forget that the slab can be made up of several bodies and that in addition to the holes there can be modifiers (mass element) and interference such as columns, etc.
So slab has the option to choose the bodies through "GetComponentBodies".

Gepaha_0-1717618094538.png

 

0 Likes