Reply

How do you find fills on an assembly sketch

I have 2 fills on an assembly sketch and I want to find the colour ofe the fill. How do I find what I want?

 

I thought what I was after was the boundaries object:

 

objAsmDoc = objSEApp.ActiveDocument

Lays = objAsmDoc.Layouts
lay = Lays(1)
Bndries = lay.Profile.boundaries2d

When I check the number of boundaries I get 8 returned, where I was only expecting 2?

 

 

6 REPLIES

Re: How do you find fills on an assembly sketch

[ Edited ]

Do you use Spy for Solid Edge ?

I can see only 2 boundary2ds, see image below:

 

Boundary2D.png

 

Re: How do you find fills on an assembly sketch

Hi Tushar

 

Thanks for the reply. I had a look at the mouseEvents macro and that helped. 

 

What I really want is to be able to locate items at an x, y coordinate on the sketch where the macro is supplying the points. So it would operate like the mouse events, but instead of the mouse click event supplying the items found under the click, the macro suppliers the point.

Re: How do you find fills on an assembly sketch

Hi Alan:

 

Is your question about boundary2D or mouse click coordinates ?

 

Tushar

 

Re: How do you find fills on an assembly sketch

Hi

 

It's about locating items (boundary2d in this case) at a keyed in (x,y) coordinate. 

Re: How do you find fills on an assembly sketch

I don't have the code but can give an approach.

A boundary2D object has BoundingObjects collection.

Check each object if it is a line, arc, etc. and get its keypoints i.e. start/end points.

Using a general algorithm determine if the mouse clicked point is inside this polygon.

 

Re: How do you find fills on an assembly sketch

Nice idea, but the shapes could be very irregular, so I don't think that will work.