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: 

Input on mouse instead coordinates

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
GSK2019
387 Views, 4 Replies

Input on mouse instead coordinates

Hello,

 

Is there is a code that you have a can use, so you can click where something has to be, instead of using coordinates? (something like revision table/Parts list etc).

4 REPLIES 4
Message 2 of 5
A.Acheson
in reply to: GSK2019

It could be done but would be a more complex process and perhaps unecessary for the user. Is the table not against a border of some kind? You can detect the borders of a sheet, work out the table size if the placement point isnt against a border then  then just move the table against the border. Here is a post with a postion sub routine.

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 5
GSK2019
in reply to: A.Acheson

Well that is maybe even better, is it hard to put in a corner every time automatically?

F.e.:

A0_landscape top right

A1_Portrait top right?

Message 4 of 5
A.Acheson
in reply to: GSK2019

If you look for the position sub routine in the precious link you will see border.RangeBox.MaxPoint.X which is the right hand side border and Y the top right hand corner.

For the partslist all you need is this point. If you place it in a sub like the rev table you can call it when you change orientation.

 

oTablePt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Border.RangeBox.MaxPoint.X, oSheet.TitleBlock.RangeBox.MaxPoint.Y)

This sub is set up for the rev table on right hand bottom corner.

 

Private Sub	Positiontable( oTablePt As Point2d,oSheet As Sheet)

Dim oRevTableItem As RevisionTable
oRevTableItem = oSheet.RevisionTables.Item(1) 

Dim oWidthRevTable As Double
oWidthRevTable = oRevTableItem.RangeBox.MaxPoint.X - oRevTableItem.RangeBox.MinPoint.X

Dim oHeightRevTable As Double
oHeightRevTable = oRevTableItem.RangeBox.MaxPoint.Y - oRevTableItem.RangeBox.MinPoint.Y

oTablePt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Border.RangeBox.MaxPoint.X - oWidthRevTable, oSheet.TitleBlock.RangeBox.MaxPoint.Y + oHeightRevTable)

oRevTableItem.Position = oTablePt
End Sub

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 5 of 5
GSK2019
in reply to: A.Acheson

Thank you!

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

Post to forums  

Autodesk Design & Make Report