Making reference to this post:
where a script had been created that automatically constrain the planes of two selected objects to each other.
It would be very useful to be able to develop an integration with a window in which you can choose which reference planes to align with each other.
This way it would be much quicker to apply constraints.
Would anyone be able to do something similar?
Making reference to this post:
where a script had been created that automatically constrain the planes of two selected objects to each other.
It would be very useful to be able to develop an integration with a window in which you can choose which reference planes to align with each other.
This way it would be much quicker to apply constraints.
Would anyone be able to do something similar?
I've made this tool for myself:
I can optionally enter a sub component name in case I want to constrain a subassembly using the planes in a sub component of that subassembly. Further I can enter the names of the work features in the first and second component that should be constrained together, the constraint type and the offset. When clicking OK I get prompted to select component 1, then component 2 and the constraints are made. Then it prompts me to select component 1 again, then component 2 and so on until I press Esc.
So it is definitely possible to make something like this. I would suggest to start by creating some ilogic rules to become familiar with constraining components by code and then moving it over to an add-in where you can add a user interface to make it easy to use.
I've made this tool for myself:
I can optionally enter a sub component name in case I want to constrain a subassembly using the planes in a sub component of that subassembly. Further I can enter the names of the work features in the first and second component that should be constrained together, the constraint type and the offset. When clicking OK I get prompted to select component 1, then component 2 and the constraints are made. Then it prompts me to select component 1 again, then component 2 and so on until I press Esc.
So it is definitely possible to make something like this. I would suggest to start by creating some ilogic rules to become familiar with constraining components by code and then moving it over to an add-in where you can add a user interface to make it easy to use.
Hi, @mat_hijs,
thanks for your reply!
Unfortunately I'm not that expert to be able to create a similar program on my own.
If you could share this tool or the related script, it would be very useful to all other Inventor users.
It would be very kind of you...
Thanks in advance!
Hi, @mat_hijs,
thanks for your reply!
Unfortunately I'm not that expert to be able to create a similar program on my own.
If you could share this tool or the related script, it would be very useful to all other Inventor users.
It would be very kind of you...
Thanks in advance!
Since what I've made is part of an add-in it's not just one piece of code that you can copy and paste. I'm also not keen on sharing the whole add-in.
I think the best way for you to create something similar is to take it step by step and then try to combine everything into something that works for you. Here are some things you'll need:
And here are some samples that may help you get started:
Feel free to ask for further help should you get stuck.
Since what I've made is part of an add-in it's not just one piece of code that you can copy and paste. I'm also not keen on sharing the whole add-in.
I think the best way for you to create something similar is to take it step by step and then try to combine everything into something that works for you. Here are some things you'll need:
And here are some samples that may help you get started:
Feel free to ask for further help should you get stuck.
Hello @mat_hijs,
thank you again for your interest and technical support which I really appreciate.
The sequence of steps you indicated does more or less the same thing as the initial script I was referring to (see link in the first post of this discussion) which constrains the work plans together.
Now I would need the user interface where I can select the reference planes. This is my main problem that I would like to find a solution to.
Do you have any suggestions?
Hello @mat_hijs,
thank you again for your interest and technical support which I really appreciate.
The sequence of steps you indicated does more or less the same thing as the initial script I was referring to (see link in the first post of this discussion) which constrains the work plans together.
Now I would need the user interface where I can select the reference planes. This is my main problem that I would like to find a solution to.
Do you have any suggestions?
Regarding user interface the first option is ilogic forms, but those are very limited in what you can do and I don't think they'll be your best choice for this.
Here's more info on that: https://help.autodesk.com/view/INVNTOR/2025/ENU/?guid=GUID-223E9090-5118-406D-9D80-EC247997A7F4
The second option is creating a windows form in visual studio, which will give you a lot more freedom to do what you want, but is also a bit more difficult. If you read a bit about it or do a quick youtube search, creating the form itself shouldn't be too much of a problem as it's quite simple. However, if you want to use a windows form you'll need to create an add-in that contains the form and the functionality that you want behind the form.
Here's some info about windows forms, but you'll be able to find a lot more with a quick search: https://learn.microsoft.com/en-us/dotnet/desktop/winforms/?view=netdesktop-8.0
Here's a guide to create your first add-in: https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/29mPk2V7aweIo6eLckSF1k.html
Your third option would be to create a windows form in visual studio and have it called from an ilogic rule. I'm not sure why you would use this approach over creating an add-in but maybe someone else here can give their opinion on that.
Here's a little bit of info about that: https://help.autodesk.com/view/INVNTOR/2025/ENU/?guid=GUID-32B66838-22E4-4A0A-B5BB-862350C76B36
Regarding user interface the first option is ilogic forms, but those are very limited in what you can do and I don't think they'll be your best choice for this.
Here's more info on that: https://help.autodesk.com/view/INVNTOR/2025/ENU/?guid=GUID-223E9090-5118-406D-9D80-EC247997A7F4
The second option is creating a windows form in visual studio, which will give you a lot more freedom to do what you want, but is also a bit more difficult. If you read a bit about it or do a quick youtube search, creating the form itself shouldn't be too much of a problem as it's quite simple. However, if you want to use a windows form you'll need to create an add-in that contains the form and the functionality that you want behind the form.
Here's some info about windows forms, but you'll be able to find a lot more with a quick search: https://learn.microsoft.com/en-us/dotnet/desktop/winforms/?view=netdesktop-8.0
Here's a guide to create your first add-in: https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/29mPk2V7aweIo6eLckSF1k.html
Your third option would be to create a windows form in visual studio and have it called from an ilogic rule. I'm not sure why you would use this approach over creating an add-in but maybe someone else here can give their opinion on that.
Here's a little bit of info about that: https://help.autodesk.com/view/INVNTOR/2025/ENU/?guid=GUID-32B66838-22E4-4A0A-B5BB-862350C76B36
Can't find what you're looking for? Ask the community or share your knowledge.