Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extrusion using iLogic

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
axa-61
3586 Views, 6 Replies

Extrusion using iLogic

 

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
6 REPLIES 6
Message 2 of 7
jingyi.liu
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.



Jingyi Liu

Inventor Product Manager
Message 3 of 7
axa-61
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
Message 4 of 7
jingyi.liu
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.

 



Jingyi Liu

Inventor Product Manager
Message 5 of 7
axa-61
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
Message 6 of 7
jingyi.liu
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

 



Jingyi Liu

Inventor Product Manager
Message 7 of 7
axa-61
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report