Inventor General Discussion

Inventor General Discussion

Reply
Contributor
axa-61
Posts: 24
Registered: ‎08-08-2012
Message 1 of 7 (758 Views)
Accepted Solution

Extrusion using iLogic

758 Views, 6 Replies
08-09-2012 11:52 PM

 

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"

 

Thank you

Alexei

Inventor 2013 SP2
Windows 7, 64 bits
RAM 18GB
Core TM2 Duo CPU 2,99 Gz
Employee
jingyi.liu
Posts: 121
Registered: ‎08-28-2007
Message 2 of 7 (729 Views)

Re: Extrusion using iLogic

08-15-2012 02:55 AM in reply to: axa-61

Why not extrude the sketch1 and use iLogic to turn on/off the extrusion feature? I thought that's way iLogic used to do.

Inventor Professional 2015

Jingyi Liu
Quality Assurance Team
Autodesk
Contributor
axa-61
Posts: 24
Registered: ‎08-08-2012
Message 3 of 7 (720 Views)

Cut Extrusion in Assembly Through the Pattern using iLogic

08-15-2012 07:05 AM in reply to: jingyi.liu

Hi Jingyi,

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.

 

Thank you

Alex

Inventor 2013 SP2
Windows 7, 64 bits
RAM 18GB
Core TM2 Duo CPU 2,99 Gz
Employee
jingyi.liu
Posts: 121
Registered: ‎08-28-2007
Message 4 of 7 (706 Views)

Re: Cut Extrusion in Assembly Through the Pattern using iLogic

08-15-2012 10:50 PM in reply to: axa-61

Hi, axa-61

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.

 

Inventor Professional 2015

Jingyi Liu
Quality Assurance Team
Autodesk
Contributor
axa-61
Posts: 24
Registered: ‎08-08-2012
Message 5 of 7 (694 Views)

Re: Cut Extrusion in Assembly Through the Pattern using iLogic

08-16-2012 01:15 AM in reply to: jingyi.liu

Hi Jingyi,

 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.

Alex

Inventor 2013 SP2
Windows 7, 64 bits
RAM 18GB
Core TM2 Duo CPU 2,99 Gz
Employee
jingyi.liu
Posts: 121
Registered: ‎08-28-2007
Message 6 of 7 (682 Views)

Re: Cut Extrusion in Assembly Through the Pattern using iLogic

08-19-2012 11:02 PM in reply to: axa-61

Hi Axa-61

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

 

Inventor Professional 2015

Jingyi Liu
Quality Assurance Team
Autodesk
Contributor
axa-61
Posts: 24
Registered: ‎08-08-2012
Message 7 of 7 (665 Views)

Re: Cut Extrusion in Assembly Through the Pattern using iLogic

08-20-2012 07:29 AM in reply to: jingyi.liu

Jingyi! Now it really works!

Thank you very much for your kind co-operation and patience!

 

Alex

Inventor 2013 SP2
Windows 7, 64 bits
RAM 18GB
Core TM2 Duo CPU 2,99 Gz
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.