Hi Guys, Really nice material. Maybe it would be a good idea to renew this topic in a context of Visual Studio Community? This VB Editor is quite ... weak comparing to this. There is a lot to show about making addins and external apps for inventor but there is no fresh material about it.
MenmoniQ66, thanks for the feedback! We wanted to cater to the lowest common denominator in this case to appeal to a wider audience, but we certainly have the experience in using VS to complete the same tasks. If you would like to chat with any of our programmers/engineers about the process in Visual Studio, I'd be more than happy to set that up for you. Let me know! -Nigel
Hi , I just watched your video, thanks for that. I wanted to know if it was possible to access the "ilogic design copy" with the API? I can't find any information about autodesk. Could you help me on this? thank you. Goot job KETIV
Hi Lous-Philippe, your best bet would be to send us an email @ questions@ketiv.com; and one of our automation engineers should be able to help you get started.
I have used the same script for fillet deletion and I encountered an error: "Runtime error 5: invalid call or argument". A quick debug revealed where the issue lies: the program finds and deletes "Fillet1" at runtime; this effectively removes one item (the first one) in the corresponding collection, that now contains only one item. When it arrives to "next", it tries to access index=2 but doesn't find it anymore because now there is only one item in the collection. In other words, since the first cycle deleted from the collection "Item1" because it was named "Fillet1", "Item2" took its place and is now listed as "Item1" in the collection for the second cycle. I think the logic behind it returning an error is sound, but I have absolutely no clue about why your script run smoothly in your video! Anyone else having a similar problem? Cheers
Hi Matteo, Thanks for reaching out. Unfortuantely, that's a bit more in depth than we can cover in a youtube comment, but you may be able to find a solution by perusing out ilogic content on our blog: ketiv.com/?s=ilogic&post-type=post#pageStart Thanks again for reaching out, and thank you for watching!
I also can't understand why this guy's code in the video works without error... But I figured out how to get rid of this error! It's possible to navigate through a collection using a different approach (For Each cycle). This should help: Dim oFillet As FilletFeature For Each oFillet In oFilletFeatures If oFillet.Name = "Fillet1" Then If MsgBox("Wanna delete Fillet1?", vbYesNo) = vbYes Then oFillet.Delete Else MsgBox ("Wasn't deleted") End If End If Next
Also, it's hard for me to understand why in the example we're iterate through the collection by index, if we know the name of the element... It's much easier to select the collection object by its name. No need to use the cycle: Dim oFilletFeatures As FilletFeatures Set oFilletFeatures = oPartDoc.ComponentDefinition.Features.FilletFeatures
Dim oFillet As FilletFeature Set oFillet = oFilletFeatures.Item("Fillet1") oFillet.Delete
I am self taught for both Inventor (since Series 9) and iLogic Since 2017. I have had a lot of help along the way trouble shooting some of my more complicated efforts. Some of that help has included incorporated API code into iLogic. When I finally started to make sense of the iLogic programming, it was because I could "read" the code because it made sense. The API code, however, is completely different. Would it be possible to do a video tutorial on the API code. What I am looking for is an explanation of the syntax. For example, what does "dim" mean in API syntax? When I first learned Autocad way back with Rel. 9, my mentor had me dig into the .mnu code and start writing macros to automate the drawing process. I began to "learn" the .mnu language. I have learned the iLogic language (to some extent) but the API language... Well, lets just say the little light hasn't lit up yet. I can't seem to make sense of the syntax. Please help. Thanks for you time.
Frank, When you say API are you talking about VB.Net (stand-alone program like Visual Studio Express) or VBA (the programming that's still done in Inventor but not iLogic)? I worked with Excel VBA before I started on iLogic (also self taught) so for me VBA was easier but now I prefer iLogic. If you are looking to learn the basic syntax for VBA (When to Dim a variable when to Set that variable, ect.) you should do some Googling on "Excel VBA basics". They have a HUGE user base of intro to VBA (I personally like www.cpearson.com). Excel even has a record macro to help you capture the basic structure for your first codes. I know it seems odd to tell you to learn a new program to learn part of Inventor but there is so much more out there on Excel and the syntax carries over very well. Also VB6 has a similar syntax (I believe VBA is actually left over from VB6) but it's so much older I don't know that you'll have as much luck with it. Best of luck.
Vo, AutoCAD's approach to automation is definitely different than that in Inventor. I would suggest contacting our team directly at questions@ketiv.com if you have some specific AutoCAD automation needs.
I thinks its a cool feature, however for removing a fillet you needed at least 10 minutes and this is usually takes a few seconds, I don't see the benefit of it as you show it in this session.
Seyar, we used the examples as there are definite use cases for having to complete these tasks on an incredibly large scale. Imagine having hundreds if not thousands of different assembly configurations that can be generated instantly. It's really powerful, but automation in general certainly favors certain projects that have tons of volume and are configurable.
Follow us!
Facebook ►► facebook.com/KETIVTech/
Twitter ►► twitter.com/KetivTech
LinkedIn ►► www.linkedin.com/company/ketiv-technologies-inc
Blog ►► ketiv.com/blog/subscribe/
Brilliantly explained. Most probably best tutorial for introduction and basics.. good job KETIV
Thank you Sajid! Don't forget to subscribe for more videos like this at ketiv.com/ava
We want to apply API or ilogic for Inventor CAM, can you derict me to the right direction?
Hi Guys,
Really nice material.
Maybe it would be a good idea to renew this topic in a context of Visual Studio Community?
This VB Editor is quite ... weak comparing to this. There is a lot to show about making addins and external apps for inventor but there is no fresh material about it.
MenmoniQ66, thanks for the feedback! We wanted to cater to the lowest common denominator in this case to appeal to a wider audience, but we certainly have the experience in using VS to complete the same tasks. If you would like to chat with any of our programmers/engineers about the process in Visual Studio, I'd be more than happy to set that up for you. Let me know!
-Nigel
Is there pdf documents available to cover all of the program functions available in the API and how to use them? If so where can I access them?
Hey Rodney, the automation diy-kit has some of this background info! Thanks! ketiv.com/automation-diy-kit/
Hi ,
I just watched your video, thanks for that.
I wanted to know if it was possible to access the "ilogic design copy" with the API? I can't find any information about autodesk. Could you help me on this? thank you. Goot job KETIV
Hi Lous-Philippe, your best bet would be to send us an email @ questions@ketiv.com; and one of our automation engineers should be able to help you get started.
I have used the same script for fillet deletion and I encountered an error: "Runtime error 5: invalid call or argument".
A quick debug revealed where the issue lies: the program finds and deletes "Fillet1" at runtime; this effectively removes one item (the first one) in the corresponding collection, that now contains only one item. When it arrives to "next", it tries to access index=2 but doesn't find it anymore because now there is only one item in the collection. In other words, since the first cycle deleted from the collection "Item1" because it was named "Fillet1", "Item2" took its place and is now listed as "Item1" in the collection for the second cycle.
I think the logic behind it returning an error is sound, but I have absolutely no clue about why your script run smoothly in your video! Anyone else having a similar problem? Cheers
Hi Matteo,
Thanks for reaching out. Unfortuantely, that's a bit more in depth than we can cover in a youtube comment, but you may be able to find a solution by perusing out ilogic content on our blog:
ketiv.com/?s=ilogic&post-type=post#pageStart
Thanks again for reaching out, and thank you for watching!
I also can't understand why this guy's code in the video works without error... But I figured out how to get rid of this error! It's possible to navigate through a collection using a different approach (For Each cycle). This should help:
Dim oFillet As FilletFeature
For Each oFillet In oFilletFeatures
If oFillet.Name = "Fillet1" Then
If MsgBox("Wanna delete Fillet1?", vbYesNo) = vbYes Then
oFillet.Delete
Else
MsgBox ("Wasn't deleted")
End If
End If
Next
Also, it's hard for me to understand why in the example we're iterate through the collection by index, if we know the name of the element... It's much easier to select the collection object by its name. No need to use the cycle:
Dim oFilletFeatures As FilletFeatures
Set oFilletFeatures = oPartDoc.ComponentDefinition.Features.FilletFeatures
Dim oFillet As FilletFeature
Set oFillet = oFilletFeatures.Item("Fillet1")
oFillet.Delete
can we record macros for python?
I am self taught for both Inventor (since Series 9) and iLogic Since 2017. I have had a lot of help along the way trouble shooting some of my more complicated efforts. Some of that help has included incorporated API code into iLogic. When I finally started to make sense of the iLogic programming, it was because I could "read" the code because it made sense. The API code, however, is completely different. Would it be possible to do a video tutorial on the API code. What I am looking for is an explanation of the syntax. For example, what does "dim" mean in API syntax? When I first learned Autocad way back with Rel. 9, my mentor had me dig into the .mnu code and start writing macros to automate the drawing process. I began to "learn" the .mnu language. I have learned the iLogic language (to some extent) but the API language... Well, lets just say the little light hasn't lit up yet. I can't seem to make sense of the syntax. Please help. Thanks for you time.
Frank, When you say API are you talking about VB.Net (stand-alone program like Visual Studio Express) or VBA (the programming that's still done in Inventor but not iLogic)? I worked with Excel VBA before I started on iLogic (also self taught) so for me VBA was easier but now I prefer iLogic. If you are looking to learn the basic syntax for VBA (When to Dim a variable when to Set that variable, ect.) you should do some Googling on "Excel VBA basics". They have a HUGE user base of intro to VBA (I personally like www.cpearson.com). Excel even has a record macro to help you capture the basic structure for your first codes. I know it seems odd to tell you to learn a new program to learn part of Inventor but there is so much more out there on Excel and the syntax carries over very well. Also VB6 has a similar syntax (I believe VBA is actually left over from VB6) but it's so much older I don't know that you'll have as much luck with it. Best of luck.
Here is some info on VB.NET ketiv.com/blog/how-to-program-in-inventor-ilogic-vb-net-operators-and-expressions/
Nice thanks
You are welcome!
How do you Update the iproperties (Wright & volume) of a component in an assembly?
Thank you for your generous, Can you direct to make code that use like auto cad such as command " match properties" etc,..
Vo, AutoCAD's approach to automation is definitely different than that in Inventor. I would suggest contacting our team directly at questions@ketiv.com if you have some specific AutoCAD automation needs.
Still waiting for a video with explanation of API syntax.
Check out this video here: ua-cam.com/video/JhTxJ2E_drs/v-deo.html
I thinks its a cool feature, however for removing a fillet you needed at least 10 minutes and this is usually takes a few seconds, I don't see the benefit of it as you show it in this session.
Seyar, we used the examples as there are definite use cases for having to complete these tasks on an incredibly large scale. Imagine having hundreds if not thousands of different assembly configurations that can be generated instantly. It's really powerful, but automation in general certainly favors certain projects that have tons of volume and are configurable.
How to ilogic tutorial pdf download
Check out our Automation Kit here: ketiv.com/automation-diy-kit/