Parts list CUTDETAIL wrong

Parts list CUTDETAIL wrong

jacobssteven77
Explorer Explorer
421 Views
6 Replies
Message 1 of 7

Parts list CUTDETAIL wrong

jacobssteven77
Explorer
Explorer

Hello,

 

When inserting CUTDETAIL to my part list it shows the wrong values, as you can see in de attached drawing.

 

I took a stair railing and added the values on the sketch as to be cutted on te sawtable by hand in the workplace, this is a different value than inventor shows .

 

On the drawing on the (Part nr 26 and 27) left you can see a mitter that has 2 cutting values of 25.3° that is correct 

in the part list it shows for part 26 'Miter 64.67° CUTDETAIL3 and Miter 25.33° CUTDETAIL4

                                          for part 27 'Miter 64.67° CUTDETAIL1 and Cut Angle 90° CUTDETAIL2 and Cut Angle 90°CUTDETAIL4

 

If i extract the cut value in inventor from 90° it is the correct cut value:  90°-64.67°(inventor value)= 25.33°(correct cut angle on saw)

 

Part 27 only has 2 cuts to be made one of 90° and one of 23.33° How come it shows 3 Cuts in the parts list ?

 

Every part has 2 cut angles why do i have to activate CUTDETAIL 1-2-3 and 4 and inventor does not show the right cut values?

 

There has to be a better way that only shows the 2 needed cuts with the right angles for every part.

 

Thank you 

 

INventor part list CUTDETAIL.png

 

 

0 Likes
422 Views
6 Replies
Replies (6)
Message 2 of 7

CCarreiras
Mentor
Mentor

Hi!

 

Frame generator tool creates the "cutdetails" based in the operations you perform, not on the final geometry measurements.

 

Part 27: Probably you trim the profile before the Miter (in the same side), so in this part you did two trims and one Miter (3 cut operations).

 

The others parts, i can't say much, only inspecting the model.

CCarreiras

EESignature

0 Likes
Message 3 of 7

jacobssteven77
Explorer
Explorer

Hello, i found a thread that handled this issue, but i dont know where and how to implement the script properly, maybe somebody can help?

 

Solved: Re: Frame Generator - Miter and cut detail - customized BOM - Page 2 - Autodesk Community - ...

0 Likes
Message 4 of 7

CCarreiras
Mentor
Mentor

Hi!

Open your assembly and:

 

1- Open Ilogic browser

2- create a new rule in "rules Tab

CCarreiras_0-1730290677111.png

 

3- copy/paste the scrip into the new rule

4- save the rule and run the rule

CCarreiras_1-1730290753225.png

 

CCarreiras

EESignature

0 Likes
Message 5 of 7

jacobssteven77
Explorer
Explorer

Thank you,

I implemented and runned the code true a rule as you instructed but...

 

The rule seems to only work on the 'CUTDETAIL' and have odd results on Miter. (see pic in attachement)

I looked into the code and it is scripted the same for 'CUTDETAIL' as for 'Miter', i am no programmer so dont know what the problem may be?

 

This is the code

    ' Get the active assembly. 
    Dim oAsmDoc As AssemblyDocument 
    oAsmDoc = ThisApplication.ActiveDocument  
	 
    ' Get the assembly component definition. 
    Dim oAsmDef As AssemblyComponentDefinition  
    oAsmDef = oAsmDoc.ComponentDefinition 

    ' Get all of the leaf occurrences of the assembly. 
    Dim oLeafOccs As ComponentOccurrencesEnumerator 
    oLeafOccs = oAsmDef.Occurrences.AllLeafOccurrences 

    ' Iterate through the occurrences and print the name. 
	Dim cnt As Integer 
	cnt = 0
	Dim total As Double  
	 
	Dim oOcc As ComponentOccurrence
	For Each oOcc In oLeafOccs
		If oOcc.DefinitionDocumentType = kPartDocumentObject Then
            Dim oReferDoc As PartDocument
            oReferDoc = oOcc.ReferencedDocumentDescriptor.ReferencedDocument
                   
            Dim oProp As Inventor.Property
            For Each oProp In oReferDoc.PropertySets.Item(4)
            
                 If oProp.DisplayName.Contains("CUTDETAIL") = True Then
					Dim oName As String 
					oName = oProp.Name
					
                    Dim sawAngle As String
                    sawAngle = oProp.Value 
					
					Dim angle(1) As String 
					angle = sawAngle.Split(" ")
			
					Select Case angle(0)
					Case "Cut" 
						If angle(2) <> 90 Then 
						needAngle = 90 - Convert.ToDouble(angle(2))
						oReferDoc.PropertySets.Item(4).Item(oName).Value = "Cut Angle " + needAngle.ToString + " deg"
					End If
					
					Case "Miter" 
						If angle(1) <> 90 Then 
						needAngle = 90 - Convert.ToDouble(angle(1))
						oReferDoc.PropertySets.Item(4).Item(oName).Value = "Miter " + needAngle.ToString + " deg"
					End If
                	End Select
				End If
            Next 
        End If	 
	Next   


Maybe someone can help, thanks a lot!

 

 

 

 

0 Likes
Message 6 of 7

CCarreiras
Mentor
Mentor

Yes, if you take a look in the programming text, the rule is only prepared to interact with the parameter "CUTDETAIL".

If you need  interaction with other parameters, the rule must be upgraded.

CCarreiras

EESignature

0 Likes
Message 7 of 7

jacobssteven77
Explorer
Explorer

'Miter' is also included :

Select Case angle(0)
					Case "Cut" 
						If angle(2) <> 90 Then 
						needAngle = 90 - Convert.ToDouble(angle(2))
						oReferDoc.PropertySets.Item(4).Item(oName).Value = "Cut Angle " + needAngle.ToString + " deg"
					End If
					
					Case "Miter" 
						If angle(1) <> 90 Then 
						needAngle = 90 - Convert.ToDouble(angle(1))
						oReferDoc.PropertySets.Item(4).Item(oName).Value = "Miter " + needAngle.ToString + " deg"

With the same code but an odd result in parts list


 

0 Likes