Holes counting and sorting based on diameter.

Holes counting and sorting based on diameter.

Ahmed.shawkyXTZHN
Enthusiast Enthusiast
3,518 Views
23 Replies
Message 1 of 24

Holes counting and sorting based on diameter.

Ahmed.shawkyXTZHN
Enthusiast
Enthusiast

Hello all ,

I have one code to count the number of holes in the whole assembly , but I need to also sort the holes based on the dia.

for example  10 mm = # 100 

                        12 mm = # 50

and so on , so can Count the fasteners based on these details.

 holes counting rule .

'To run external rule for all sheet metal parts
Dim aDoc As AssemblyDocument
aDoc = ThisApplication.ActiveDocument
Dim iDoc As Document
For Each iDoc In aDoc.AllReferencedDocuments
If iDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
auto = iLogicVb.Automation
auto.RunExternalRule(iDoc, ”Hole”)
iDoc.Close()
End If
Next

iLogicVb.UpdateWhenDone = True

  thanks in advance.

0 Likes
Accepted solutions (3)
3,519 Views
23 Replies
Replies (23)
Message 21 of 24

Jordon.Oldham
Participant
Participant
Hi

sorry to jack the thread, i tried running the above rule for holes in an assembly but i keep getting 'Error on line 5 in rule: HOLE COUNT, in document: FLR-EF-11R-70-01-GA-A00.iam

Class not registered'

could you advise?

Many thanks
0 Likes
Message 22 of 24

dmitrij.furasovSJTF7
Explorer
Explorer

Hi Jhoel,

Is it possible to make some changes in this rule, to count holes in non sheet metal parts?

Thanks!

0 Likes
Message 23 of 24

nowell.colsenXK53F
Enthusiast
Enthusiast

I found your code for the hole Count. what if the part is not a sheet metal? 

Message 24 of 24

Ahmed.shawkyXTZHN
Enthusiast
Enthusiast

Hi @JhoelForshav  can we update the code that generate the drawing table to be part wise and to come in cutting list so all details will come in one table , thanks.

0 Likes