Problem in IntersectWith

Problem in IntersectWith

alexisgacia
Advocate Advocate
596 Views
0 Replies
Message 1 of 1

Problem in IntersectWith

alexisgacia
Advocate
Advocate

Hi,

 

Good day.

 

I'm having problem with my code. I am new in AutoCad VB.NET and I'm trying to recreate the tool that I created in VBA. I encounter a problem using the intersectWith. Please check the code below.

 

Error:

Severity Code Description Project File Line Suppression State
Error BC30518 Overload resolution failed because no accessible 'IntersectWith' can be called with these arguments:
'Public Overloads Sub IntersectWith(entityPointer As Entity, intersectType As Intersect, points As Point3dCollection, thisGraphicSystemMarker As IntPtr, otherGraphicSystemMarker As IntPtr)': Value of type 'Point3dCollection()' cannot be converted to 'Point3dCollection'.
'Public Overloads Sub IntersectWith(entityPointer As Entity, intersectType As Intersect, points As Point3dCollection, thisGraphicSystemMarker As Long, otherGraphicSystemMarker As Long)': Value of type 'Point3dCollection()' cannot be converted to 'Point3dCollection'

 

Code:



If points.Count > 0 Then DBSplitCol = oPL.GetSplitCurves(points) Using docloc As DocumentLock = doc.LockDocument Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction() oBlockTblRec = acTrans.GetObject(db.CurrentSpaceId, OpenMode.ForWrite) Try Dim DBCol_OS_1 As DBObjectCollection = oPL.GetOffsetCurves(RampTotalWidth / 2) Dim DBCol_OS_2 As DBObjectCollection = oPL.GetOffsetCurves(-(RampTotalWidth / 2)) oL_Side1 = DBCol_OS_1.Item(0) oL_Side2 = DBCol_OS_2.Item(0) Dim acLine As Line = New Line(ptOrient, points.Item(0)) acLine.IntersectWith(CType(oL_Side2, Entity), Intersect.ExtendThis, TmpPnts, New IntPtr(0), New IntPtr(0))

Thanks and best regards,

Alex

0 Likes
597 Views
0 Replies
Replies (0)