.NET

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

How to get current space?

143 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,133
Registered: ‎04-29-2006
Message 2 of 3 (130 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 (117 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
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.