.NET

.NET

Reply
Contributor
hassanhafeez33
Posts: 17
Registered: ‎09-16-2011
Message 1 of 5 (198 Views)
Accepted Solution

Selecting lines around an intersection point with a reference line

198 Views, 4 Replies
09-17-2011 04:13 AM

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

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.

Contributor
hassanhafeez33
Posts: 17
Registered: ‎09-16-2011
Message 2 of 5 (194 Views)

Re: Selecting lines around an intersection point with a reference line

09-17-2011 07:05 AM in reply to: hassanhafeez33

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. 

Distinguished Contributor
quigs
Posts: 143
Registered: ‎09-30-2008
Message 3 of 5 (185 Views)

Re: Selecting lines around an intersection point with a reference line

09-17-2011 07:56 AM 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.. :smileyvery-happy:
Contributor
hassanhafeez33
Posts: 17
Registered: ‎09-16-2011
Message 4 of 5 (176 Views)

Re: Selecting lines around an intersection point with a reference line

09-17-2011 12:04 PM 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 :smileyhappy:

 

Distinguished Contributor
quigs
Posts: 143
Registered: ‎09-30-2008
Message 5 of 5 (169 Views)

Re: Selecting lines around an intersection point with a reference line

09-17-2011 05:23 PM 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.. :smileyvery-happy:
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.