简体   繁体   中英

Autocad .NET - Get Layer width and height for plotting

i'm struggeling a little with my Autocad Plugin..

Since i have a huge amount of AutoCad Drawings to plot programmatically as a pdf-File i found out that some of them contain much unnecessary stuff on it.

i only want to plot a specific area which is defined in a layer. I have no problem of search for the layer and check for its properties but i can not find a single thing about coordinates or something like a height or a width..

So my question is simple: Is there a chance to get the height and width or something like that to print only the needed stuff inside the area of that layer?

Thanks

Alex

If you have a selection set of all the entities you want to plot, loop through and get each entities extents.

Compare each entity against a return value and grab the largest min and max points of everything in your selection set. This will give your the window area bounds you want to plot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM