.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get current space?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
HelloWorlddd
934 Views, 2 Replies

How to get current space?

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.

2 REPLIES 2
Message 2 of 3
_gile
in reply to: HelloWorlddd

Hi,

 

Have a look at Database.CurrentSpaceId property.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 3
HelloWorlddd
in reply to: _gile

Thanks : )

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost