I have closed profile "Sketch1" placed on one of the parts in Assembly.
Please suggest iLogic code to create cut Extruson (Extents=All) based on the "Sketch1"
Solved! Go to Solution.
Why not extrude the sketch1 and use iLogic to turn on/off the extrusion feature? I thought that's way iLogic used to do.
Right it works this way but not in my case. I was actually looking for work around another issue I published earlier and did not get any reply so far.
May be you can help me.
Here is the case.
An assembly contains square Plate and a Rib (Angle bar). Plate has a cutout (window). Rib Pattern covers whole Plate. Ribs size, shape and Number of pattern components (Ribs) can vary. Window dimensions and its position on the plate can vary too. Same cases no window at all.
The task is to cut through the ribs where they come across the window. The way you suggested it works fine unless you change number of pattern components or/and window position. Then I need to add new Participants in the cut out manually. I attached screen shot and simplified assembly driven by iLogic (Inventor 2012) to illustrate the case. My company produces steel constructions and this is a real challenge we are facing in our 3D models.
Would appreciate any help in programming this task either via iLogic or VB Macro.
Undertood, attachment you can find the routine to regenerate your extrusion feature, it will help you to solve the problem, but you need make a little change on your RibCutSketch, that is, change your projected window edge into construction line, otherwise, it will not easy to get right result.
Wonderful solution! Works fine except just one minor problem. Extrusion always cuts 1inch (25mm) and when I change Anglebar size to let say 50mm it only cuts half the way. I tried to change this manually but every time code runs it sets it back to 1 inch. Is it possible to modify code in a way that it picks up and set cut depth= “RibCutDepth” parameter predefined in User Parameters for assembly?
Appriciate your kind attention in this matter.
Thank you in advance.
sorry for my late response, attachement you can find the latest code for your question.
The answer is yes, you can set a customized parameter to make the routine more flexible. Since I'm using Inv 2013, I didn't modify your model, you can replace the parameter ("Angle_size") with your customized parameter. Be careful, below code is suitable for user parameter, since their syntax are different between model parameter and user parameter.
Dim oExtrudeDef As ExtrudeDefinition
Dim oParams As Parameters
Set oParams = oDoc.ComponentDefinition.Parameters
Dim oUserParams As UserParameters
Set oUserParams = oParams.UserParameters
Dim ExtrudeDistance As Long
ExtrudeDistance = 2 * oUserParams.Item("Angle_size").Value
Jingyi! Now it really works!
Thank you very much for your kind co-operation and patience!