.NET

Reply
Valued Contributor
HelloWorlddd
Posts: 87
Registered: ‎05-03-2013
Message 1 of 3 (137 Views)
Accepted Solution

How to get current space?

137 Views, 2 Replies
04-22-2014 02:58 AM

I can use the below satement to add a circle to model space:


BlockTableRecord blockTableRecordObj = currentTransactionObj.GetObject(blockTableObj[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;

 

Or use the below statement to add a circle to paper space(Layout):


BlockTableRecord blockTableRecordObj = currentTransactionObj.GetObject(blockTableObj[BlockTableRecord.PaperSpace], OpenMode.ForWrite) as BlockTableRecord;


Now, I want to create a command create a circle, the center specified by mouse, it can be explain: add the circle to the current space base on the current window, but I did not find a property called the current space...

 

I hope someone can help me, very thanks.

Hi,

 

Have a look at Database.CurrentSpaceId property.

*Expert Elite*
_gile
Posts: 2,084
Registered: ‎04-29-2006
Message 2 of 3 (124 Views)

Re : How to get current space?

04-22-2014 04:02 AM in reply to: HelloWorlddd

Hi,

 

Have a look at Database.CurrentSpaceId property.

Gilles Chanteau
Valued Contributor
HelloWorlddd
Posts: 87
Registered: ‎05-03-2013
Message 3 of 3 (111 Views)

Re : How to get current space?

04-22-2014 05:30 AM in reply to: _gile

Thanks : )

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.