is it possible getobjectid with filter without open dwg with Document.Editor?

is it possible getobjectid with filter without open dwg with Document.Editor?

cstotal_Autodesk
Contributor Contributor
371 Views
1 Reply
Message 1 of 2

is it possible getobjectid with filter without open dwg with Document.Editor?

cstotal_Autodesk
Contributor
Contributor

Hello! I am NewB for ObjectARX.

 

Mostly I do with Common.Interop so I friendly with build code with open dwg with editor.

 

but I found if I use ObjectARX I can build it without using editor like

 

Using AcadDB As New Database(False, True)
            AcadDB.ReadDwgFile(DwgPath, FileOpenMode.OpenForReadAndAllShare, False, Nothing)

            Using Trans As Transaction = AcadDB.TransactionManager.StartTransaction
                Dim BT As BlockTable = TryCast(Trans.GetObject(AcadDB.BlockTableId, OpenMode.ForRead), BlockTable)
                Dim BTR As BlockTableRecord = TryCast(Trans.GetObject(BT(BlockTableRecord.ModelSpace), OpenMode.ForWrite), BlockTableRecord)

                For Each ObjID In BTR
                    Dim Obj As DBObject = Trans.GetObject(ObjID, OpenMode.ForWrite)

                    '....
                Next
            End Using
        End Using

but I don't know How to filtering Objects such as SlectionSetFilter.

 

I wanna get Object only specific Layer or ObjectType(TEXT, LINE, PLINE etc..).

and also want to filter crossingwindow( filter with location)

 

hopely there is way to filtering without open in ediotr but just open with database

0 Likes
372 Views
1 Reply
Reply (1)
Message 2 of 2

Virupaksha_aithal
Autodesk Support
Autodesk Support

Hi,

 

Sorry, to use editor functionality, you need to open the DWG in AutoCAD. You can not use the functionalities on side database.

 

 



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

0 Likes