Frame Generator - Miter and cut detail - customized BOM

Frame Generator - Miter and cut detail - customized BOM

Anonymous
Not applicable
4,800 Views
25 Replies
Message 1 of 26

Frame Generator - Miter and cut detail - customized BOM

Anonymous
Not applicable

Hi Guys,

This One is a good one for all you cleaver i Logic people.

 

I have a BOM that I want to use the Cutdetals from frame generator.

My need is for the figure of text that is created is not how my bosses want to use it.

The angle is created from the back edge of the box but typically the saw man will move the saw from 0 deg's which is 90 deg out from the the angle that inventor created. (hopefully you know what I mean)

so where Cutdetail says 51.33deg in my bom i want it to say 38.67deg.

first how would i do this???

also I want to bring the details into the Part number column to read as I have manually entered below.

Any Ideas on how to do this??

TEST BOM.JPG 

0 Likes
Accepted solutions (2)
4,801 Views
25 Replies
Replies (25)
Message 2 of 26

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Can you please provide sample assembly data to study the feasibility ? please make sure that files are non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 26

Anonymous
Not applicable

What do you need.

The cutdetail is great but it give you the wrong angle for a std metal saw on a saw bench.

0 Likes
Message 4 of 26

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Can you please demonstrate the requirement with snapshots (non confidential data)?

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 5 of 26

Anonymous
Not applicable

PLEASE FIND ATTACHED A BOM WITH THE CUT DETAIL ON. THIS IS THE ANGLES THAT ARE GIVEN IN THE PIC 'ANGLE NEEDED' WHICH IS NOT HOW A STD SAW WORKS. 90deg minus 51.33 gives correct angle.

 

ANGLE NEEDEDANGLE NEEDEDTHE ANGLE A SAW PERSON WOULD NEEDTHE ANGLE A SAW PERSON WOULD NEEDCUT DETAIL AS IN BOMCUT DETAIL AS IN BOM

0 Likes
Message 6 of 26

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

From where Saw angle(57.33 deg) is available? Is it in parameter or iProperty?

 

Calculated angle (90 - 57.33) is supposed to be stored?

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 7 of 26

Anonymous
Not applicable

Hi Chandra.Shekar.g

The cut detail is stored in the custom I properties but does not feature in the Parameters.

So the Cut detail angle is pulled in on the BOM from the custom I properties.

If I understand this correct you are saying I can Change this?

 

0 Likes
Message 8 of 26

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous ,

 

Try below iLogic code to update needed angle in custom iProperty of "CUTDETAIL1".

Sub Main()  
	 
    ' 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
		Try
			Dim sawAngle As String
			sawAngle = iProperties.Value(oOcc.Name, "Custom", "CUTDETAIL1") 
			Dim angle(2) As String 
			angle = sawAngle.Split(" ")
			
			If angle(0) = "Miter" Then
				
				Dim needAngle As Double
				needAngle = 90 - Convert.ToDouble(angle(1))
			
				iProperties.Value(oOcc.Name, "Custom", "CUTDETAIL1") = "Miter " + needAngle.ToString + " deg"
			
			End If  
			
		Catch 
		
		End Try 
		 
	Next   

End Sub

Thanks and regards


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 9 of 26

Anonymous
Not applicable

HOW DO I GET CUT DETAIL 2 OR 3 IN THIS I LOGIC.

ALSO AS THESE ARE FRAME GENERATOR PARTS WHERE DO I PUT THE i LOGIC?

0 Likes
Message 10 of 26

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Just change the name of property (highlighted in red color).

Dim sawAngle As String
			sawAngle = iProperties.Value(oOcc.Name, "Custom", "CUTDETAIL1") 
			Dim angle(2) As String 
			angle = sawAngle.Split(" ")
			
			If angle(0) = "Miter" Then
				
				Dim needAngle As Double
				needAngle = 90 - Convert.ToDouble(angle(1))
			
				iProperties.Value(oOcc.Name, "Custom", "CUTDETAIL1") = "Miter " + needAngle.ToString + " deg"
			
			End If 

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 11 of 26

Anonymous
Not applicable

Thanks,

And I should put this in the weldment template will it run automatically

0 Likes
Message 12 of 26

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Yes, It works for weldment assembly as well. If not, let me know.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 13 of 26

Anonymous
Not applicable

Hi chandra

I tried this I logic and it didn't change a thing. I put your code in the weldment template and built a test frame gen weldment.test2 .JPGtest 2 bom.JPG

0 Likes
Message 14 of 26

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Can you please provide sample weldment assembly to test? Please make sure that files are non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 15 of 26

Anonymous
Not applicable

I have attached a quick test piece for you

0 Likes
Message 16 of 26

Tony_Yates
Advocate
Advocate

Hi there,

 

We have ilogic in our frame generator parts.

You have to get the family template and add your code there.

Then replace the family template in content centre with the new one with code in it.

image.pngimage.png

hope this helps.

0 Likes
Message 17 of 26

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

In attached weldment assembly, there is no "CUTDETAIL" column does not exists.

BOM.png

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 18 of 26

Anonymous
Not applicable

Look in the part of the parts only BOM 

to see them in model part of BOM you have to create a custom Column called Cutdetail1 etc.

I only did it in Parts Only. 

0 Likes
Message 19 of 26

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Please create column ("CUTDETAIL1") and provide sample weldment assembly (Non confidential data).

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 20 of 26

Anonymous
Not applicable

try this,

it should be in there

0 Likes