While selecting dimensions is possible with the easy to use command "ThisApplication.CommandManager.Pick(Filter As SelectionFilterEnum, PromptText As String)" it's impossible to distinguish between the dimension line and extension lines. That is precisely what was asked for in this post.
I think that many people have a hate-love relationship with the design doctor. Of course, you never want to see that red cross at the top of your screen. But stuff breaks and you need to know about it and solve it. This is where the design doctor should shine. It should help you identify all problems and help you to solve them.
I have now 3 rules on this site to automatically generate dimensions. (Overall dimensions, Hole position and Bend dimensions) At the moment I can't think of any more types of dimensions I can generate automatically. But there is something left that we can generate.
Writing a rule that will generate the dimensions for all bend lines in a sheet metal flat pattern drawing view is not easy. This is a rule that I wanted to write for a long time but did not manage to do till now. The problem is not finding the bend lines nor finding all contour lines. But the problem is how more finding a contour line that is parallel with a bend line and is also useful.
I came across this cool piece of code that draws a bounding box around any part in any orientation. I did improve it a bit but credits should go to the topic starter of this post "a dynamic box?".
Writing code means a lot of trial and error. Debugging involves figuring out what is happening (often that is not the same as what you think that is happening). The way to figure that out is by stopping the code at the point that everything fails and checking what your computer has in memory. When I started writing iLogic rules the only way I knew for debugging was to stop the code with a messagebox and display the content of a variable.
For a computer, a number is just that. Therefore we assign units to a parameter. But most Inventor API functions return values in internal database units. This can be confusing if you expect that all values are in the units of your document. It gets even more confusing when you have a parameter in another unit type... Let's have a look at those unit types and how to convert them to the units you need.
On the "Inventor iLogic, API & VBA Forum" forum, I see often people that use or even start learning VBA. In this post, I will try to explain why I think that is not a good idea. On the Microsoft site, you can read: “Visual Studio 2010 (VC++ 10.0) Service Pack 1 reached the end of extended support on July 14, 2020”. This is important because “Visual Basic for Applications” (VBA) depends on these Microsoft Visual C++ Redistributable.
Early 2020 someone started this topic "Set different colours for each component of Assembly based on the part number". In that post, an article by Clint Brown was referenced. In that article, Clint proposed an iLogic rule for colouring each part. I updated Clint's code so it would not colour all parts with a random colour, but to give each part with the same part number the same colour.
On the "Inventor iLogic, API & VBA Forum" someone started the topic "Bug report when setting Face Name". I could reproduce a problem and I got a nice exception "The method or operation is not implemented". I expected that implementing the function "SetName" myself would not be that complicated.
In my last blog post, I proposed an iLogic rule that generated the overall dimensions. After that, I was contacted by someone on the "Inventor iLogic, API & VBA Forum" about that post. He asked for some modifications. Someone else also joined in and after some drinks, I got challenged to write a new rule that could "mark the dimensions of the holes (in a drawing)".
Autodesk Inventor, Vault, Git, C#, vb, .net, php HTML, css, js
University computer science.
HBO Mechanical engineer.
MBO Fine mechanics.
Programmer and
Mechanical engineer
at Kelvion
(2016 - 20..)
Mechanical engineer
at Strukton
(2009 - 2016)
Mechanical engineer
at RDG-engineering
(2007 - 2009)
CNC Programmer
at VMC
(2005 - 2007)
volunteer
at Taizé
(2007)
Objectgeoriënteerd analyseren en ontwerpen, Objectgeoriënteerd programmeren in Java, Webapplicaties: de clientkant, Databases, Security Aware Programmer, Web Security Specialist