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

return the objectid of current space

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
565 Views, 3 Replies

return the objectid of current space

hi. how do you get the objectid of the current space? model space or layout? im using vb.net. any help is greatly appreciated. thanks...
3 REPLIES 3
Message 2 of 4
arcticad
in reply to: Anonymous

This will return the BlockTableID of the Layout

{code}
Imports Autodesk.AutoCAD.DatabaseServices

Public Class GetLayoutTest

Sub Test()
Dim ObjLayoutManager As LayoutManager = LayoutManager.Current
Dim LayoutID As ObjectId = ObjLayoutManager.GetLayoutId(ObjLayoutManager.CurrentLayout)

Dim id As ObjectId
If ObjLayoutManager.CurrentLayout = "Model" Then
id = SymbolUtilityServices.GetBlockModelSpaceId(LayoutID.Database)
Else
id = SymbolUtilityServices.GetBlockPaperSpaceId(LayoutID.Database)
End If
End Sub

End Class
{code}
---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 3 of 4
Anonymous
in reply to: Anonymous

Database.CurrentSpaceId

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6369862@discussion.autodesk.com...
hi. how do you get the objectid of the current space? model space or layout? im
using vb.net. any help is greatly appreciated. thanks...
Message 4 of 4
arcticad
in reply to: Anonymous

or you could do that.
---------------------------



(defun botsbuildbots() (botsbuildbots))

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