.NET

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

How to get current space?

141 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,106
Registered: ‎04-29-2006
Message 2 of 3 (128 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 (115 Views)

Re : How to get current space?

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

Thanks : )

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

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