.NET

Reply
Valued Contributor
87 Posts
0 Kudos
Registered: ‎05-03-2013
Post 1 of 3
Accepted Solution

How to get current space?

147 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*
2,140 Posts
253 Kudos
Registered: ‎04-29-2006
Post 2 of 3

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
87 Posts
0 Kudos
Registered: ‎05-03-2013
Post 3 of 3

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
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!