Showing results for 
Search instead for 
Did you mean: 


Valued Contributor
Valued Contributor


Has anyone had a problem with the holes collection in V20? I have multiple

holes in the model, but when I run the following code (VB6), I get zero returned if there is more than one hole in  "holes" collection. However, if  "holes" only has one hole, the code below reports correctly. Any thoughts?

Dim Mydoc As SolidEdgePart.PartDocument

Set objApp = GetObject(, "SolidEdge.Application")

Set Mydoc = objApp.ActiveDocument

MsgBox Mydoc.models.Item(1).holes.Count


Posted by: Lonnie McGrew
Post date: 2/8/2008 2:52:31 AM


RE: Holes.Count

Valued Contributor
Valued Contributor




MsgBox Mydoc.HoleDataCollection.Count


This counts the collection of holes, not the total amount of holes.


If there are 5 collections with 3 holes each, your answer will be 5, not 15.


Posted by: Bill Ledbetter
Post date: 2/8/2008 9:07:25 AM