Hi community,
Does someone know how to split hole table on n-th row?
Regards,
Hi community,
Does someone know how to split hole table on n-th row?
Regards,
Hi @nedeljko.sovljanski. I do not think I have ever seen an Inventor API or iLogic method for that, and the HoleTable object does not appear to have a method like that, but I do know the command name(s) used.
DrawingHoleTableSplitCtxCmd
DrawingHoleTableUnsplitCtxCmd
I think you have to have a HoleTableRow object as the only thing in your Document.SelectSet, then execute that command to make that happen.
ThisApplication.CommandManager.ControlDefinitions.Item("DrawingHoleTableSplitCtxCmd").Execute
Edit: I posted too soon. I should have tried that first. I just did, and it it not working for me. It will not let us use the SelectSet.Select to select a HoleTableRow, or a HoleTableRow.HoleTag, or a HoleTableRow.ReferencedHole, so that idea was a bust. When doing this manually, you just need to have your mouse over the row in the table, where you want to split it, then click right mouse buttton, select Table > Split Table, and it does it. Not sure how to simulate same behavior. It may be looking for mouse position over table or something like that.
Wesley Crihfield
(Not an Autodesk Employee)
Hi @nedeljko.sovljanski. I do not think I have ever seen an Inventor API or iLogic method for that, and the HoleTable object does not appear to have a method like that, but I do know the command name(s) used.
DrawingHoleTableSplitCtxCmd
DrawingHoleTableUnsplitCtxCmd
I think you have to have a HoleTableRow object as the only thing in your Document.SelectSet, then execute that command to make that happen.
ThisApplication.CommandManager.ControlDefinitions.Item("DrawingHoleTableSplitCtxCmd").Execute
Edit: I posted too soon. I should have tried that first. I just did, and it it not working for me. It will not let us use the SelectSet.Select to select a HoleTableRow, or a HoleTableRow.HoleTag, or a HoleTableRow.ReferencedHole, so that idea was a bust. When doing this manually, you just need to have your mouse over the row in the table, where you want to split it, then click right mouse buttton, select Table > Split Table, and it does it. Not sure how to simulate same behavior. It may be looking for mouse position over table or something like that.
Wesley Crihfield
(Not an Autodesk Employee)
If I were you, I would create a post on the Inventor Ideas forum about this. There is a simple way to do this type of thing for other types of tables on a drawing...such as PartsList, RevisionTable, or CustomTable. They all have a "MaximumRows" property, which dictates where it will be split. The HoleTable object needs this property too, so we can split it where we want it to. I'm surprised it doesn't have that property already. Or maybe it is still a 'hidden' property or attribute or something like that, associated with the HoleTable, that we just do not know about yet. There has to be something somewhere that records that split location when we do it manually. It just may not be exposed to the API yet...not sure.
Edit: Oh, and by the way. The reverse command does work for removing an existing 'Split' in a HoleTable, because I just tried that too. You just add the HoleTable object to the SelectSet.Select, then execute the "DrawingHoleTableUnsplitCtxCmd" command.
Wesley Crihfield
(Not an Autodesk Employee)
If I were you, I would create a post on the Inventor Ideas forum about this. There is a simple way to do this type of thing for other types of tables on a drawing...such as PartsList, RevisionTable, or CustomTable. They all have a "MaximumRows" property, which dictates where it will be split. The HoleTable object needs this property too, so we can split it where we want it to. I'm surprised it doesn't have that property already. Or maybe it is still a 'hidden' property or attribute or something like that, associated with the HoleTable, that we just do not know about yet. There has to be something somewhere that records that split location when we do it manually. It just may not be exposed to the API yet...not sure.
Edit: Oh, and by the way. The reverse command does work for removing an existing 'Split' in a HoleTable, because I just tried that too. You just add the HoleTable object to the SelectSet.Select, then execute the "DrawingHoleTableUnsplitCtxCmd" command.
Wesley Crihfield
(Not an Autodesk Employee)
I will try, thank you very much.
I will try, thank you very much.
I placed it on idea board
https://forums.autodesk.com/t5/inventor-ideas/hole-table-split-api/idi-p/11751856
I placed it on idea board
https://forums.autodesk.com/t5/inventor-ideas/hole-table-split-api/idi-p/11751856
Can't find what you're looking for? Ask the community or share your knowledge.