Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hole table - split

4 REPLIES 4
Reply
Message 1 of 5
nedeljko.sovljanski
260 Views, 4 Replies

Hole table - split

nedeljko.sovljanski
Advocate
Advocate

Hi community,

 

Does someone know how to split hole table on n-th row?

 

Regards,

0 Likes

Hole table - split

Hi community,

 

Does someone know how to split hole table on n-th row?

 

Regards,

4 REPLIES 4
Message 2 of 5

WCrihfield
Mentor
Mentor

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

EESignature

(Not an Autodesk Employee)

0 Likes

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

EESignature

(Not an Autodesk Employee)

Message 3 of 5

WCrihfield
Mentor
Mentor

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

EESignature

(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

EESignature

(Not an Autodesk Employee)

Message 4 of 5

nedeljko.sovljanski
Advocate
Advocate

I will try, thank you very much.

0 Likes

I will try, thank you very much.

Message 5 of 5

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

Post to forums  

Autodesk Design & Make Report