Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Best way to test for existing obj at that coordinate.

0 REPLIES 0
Reply
Message 1 of 1
mdhutchinson
234 Views, 0 Replies

Best way to test for existing obj at that coordinate.

I am working on an improvement to a small application I created.

The object of interest is an AutoCAD MEP Pipe...

unfortunately beginning in 2012 autodesk eliminated the top level data in the entity list obtained by (entget (car (entsel))). So I am resorting to VLAX- calls. This isn't bad necessarily.

 

The part of the app I need to improve adds a pipe object at a pragmatically issued coordinate. The improvement is that I need to test for an existing pipe at a that coordinate and therefore don't add the new object.

So at the first of my application I get the existing pipes of interest and save of a global list made up of pairs of coordinates and entity handles. I thought I could chk this list to see if the coordinate exists in the list... if it does then I check the entity handle to make certain it still is in the dwg.

 

The question might be... do I need to use an equal function with a fuzz factor somehow... or is there perhaps a better more ingenious way to do this... say like converting the coordinates to a large integer value by first multiplying by 1000. And use this instead of the actual coordinate with a fuzz factor to check for a pre-existing pipe.

 

How might you suggest?

 

(((1002.51 906.208 6.375) . "14FE4")

 ((1060.29 889.366 4.0625) . "14FEA")

 ((1024.59 896.497 4.0625) . "14FED")

...

)

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost