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

Selecting lines around an intersection point with a reference line

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
hassanhafeez33
444 Views, 4 Replies

Selecting lines around an intersection point with a reference line

Hi All, 

 

Is it possible to select lines (maybe up to 6 lines) around an intersection point  with a reference line. There is one intersection point and the lines are around it. And also, both the intersecting lines are in different layers. 

 

Once I have any idea, Maybe I can get on with my project. And if someone could tell me how to get the ObjectARX's ArxDbg tool working on autocad 2012, it would be great help. ObjectARX 2010 sample project fails to open in VS2010 express.

 

Thanks in Advance!

Cheers

4 REPLIES 4
Message 2 of 5

As of now, I am able to get a selection from user and filtering out the reference line or the lines around the intersection point. The problem is, I want to make the program do the selection as well, and I have no clue. 

Message 3 of 5
quigs
in reply to: hassanhafeez33

Hi,

please forgive me if have missed the point, are you having trouble selecting

the outer lines programmatically?  If so you can use the bellow code to

make a case selection.  The filter specifically looks for 2d poly lines, but you

could just search for the object type you need.

 

 

Select Case myEnt.ObjectId.ObjectClass.Name
  Case "AcDb2dPolyline"

    Dim SelInt As PromptSelectionResult = acDoc.Editor.SelectCrossingWindow(New Point3d(PntOnLn.X + 1.6, PntOnLn.Y + 1.6, 0), New Point3d(PntOnLn.X - 1.6, PntOnLn.Y - 1.6, 0))
     End Select
End Select

 

Cheers,

 

Martin

My name is Martin.. 😄
Message 4 of 5
hassanhafeez33
in reply to: quigs

Thanks Quigs, yes the point is to select the outer lines programmatically.  but the eventual aim of my project is to search for these lines along the various intersection points along the y axis (increasing), and move them one by one ( i-e move to a different geometric location after selection around first intersection and then look and select the next set of lines). 

 

Am I supposed to have a record table of some sort? or just loop through the set of coordinates and thence select and move the lines? 

 

Thanks again for taking the time to reply! I hope one day Ill be able to help someone aswell 🙂

 

Message 5 of 5
quigs
in reply to: hassanhafeez33

I personally would use a for each o search through th lines to your matchiing criteria, then open them for write as a new line and do with them as you need.

 

Cheers,  Quigs.

My name is Martin.. 😄

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