OK.Thans very much for your reply, Sir. My line is Line of Autocad.databaseservices.Line. And part of my codes as follows:
Dim Db as database
Db.readdwgfile("myfile",FileOpenMode.OpenForReadandWriteNoShare, False,"")
dim Btr as BlockTableRecord=Db.CurrentSpaceId.GetObject(OpenMode.ForWrite)
dim Bt as BlockTable=Db.BlockTableId.Getobject(OpenMode.ForWrite)
Brt.Id.Getobject(OpenMode.ForWrite,True,True)
Bt.Objectid.Getobject(OpenMode.ForWrite)
Dim Tr as TransactionManager=Db.TransactionManager
dim Linb as line=nothing
dim acLine as line=nothing
For each ObjId as ObjectId in Btr
dim Enta as Entity=Tr.Getobject(ObjectId,OpenMode.ForWrite)
if Typeof Enta Is Line then
if Enta.ColorIndex=2 then
Linb=Tr.Getobject(Enta.ObjectId,OpenMode.ForWrite)
end if
if Enta.ColorIndex<>2 then
acLine=Tr.Getobject(Enta.ObjectId,OpenMode.ForWrite)
End if
End if
Next
dim Pta3d as Point3dCollection=New Point3dCollection
Linb.Intersectwith(acLine,Intersect.OnBothOperands,Pta3d,IntPtr.Zero,IntPtr.Zero)
if Pta3d.Count>0 then
messagebox "Find Point"
End if
and before that, I have two lines in my drawing, one is yellow, one is white.
Thanks and BR,