.NET GetSystemVariable gets variable from wrong drawing in AutoCAD 2013
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
We are in the middle of implementing AutoCAD 2013 to replace 2010 so at the moment I am converting / modifying our own code to suit the AutoCAD 2013 API.
One of our routines collects data from drawings (drawings are not fysically opened in AutoCAD) using the system variables 'LimMin' and 'LimMax' in order to collect all objects drawing within the titleblock.
Point2d min2d = (Point2d) Application.GetSystemVariable("LimMin");
Point2d max2d = (Point2d) Application.GetSystemVariable("LimMax");
Only the objects in the titleblock area need to be processed and this gives the engineers also the opportunity to add extra information outside the titleblock. We have used this method in 2007 and 2010 releases of AutoCAD succesfully.
But with AutoCAD 2013 I have run into a snag. As said does this routine not fysically open the drawing in AutoCAD it merely adresses the 'autocad database' so to speak. It seems that 2013 selects the variables from an opened active drawing instead of the 'opened' drawing by the routine. What do I need to modify in the lines of codes stated above to get this rouine up and running?
The workaround for this moment is to skip the collection in the titleblock area al together and select all objects in the entire drawing which does not speed up things very much 😉
thanks in advance of any assistence.