VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Polyline and blocks

3 REPLIES 3
Reply
Message 1 of 4
derwisz6
643 Views, 3 Replies

Polyline and blocks

How to get blocks name and points where it is crosses with polyline ?

 

1.JPG

3 REPLIES 3
Message 2 of 4
adam.nagy
in reply to: derwisz6

Hi,

 

Are you using COM or .NET API?

 

You would need to go into the block, iterate through its content and try to do intersection between each object and the polyline outside the block.

 

You would need to transform the entities according to the transformation matrix of the block reference before doing the intersections.

You could also use Explode in .NET that would give back all the block content at the right place - i.e you don't have to transform the entities yourself.

 

I hope this helps.

 

Cheers,

Adam Nagy

Autodesk Developer Network

 

 



Adam Nagy
Autodesk Platform Services
Message 3 of 4
derwisz6
in reply to: derwisz6

I'm using VBA. I try to made something like that:

1) find every polyline

2) for every polyline get them coordinates

3) made selectbypolygon for points from polyline

4) for every blocks crosses with selection made them name or id  array 

 

But I have problem to find blocks whom crosses selection. 

Message 4 of 4
derwisz6
in reply to: derwisz6

I found solution for this problem. It is necessary to regen this viewport. 🙂

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

Post to forums  

Autodesk Design & Make Report

”Boost