iLogic to Rotate a Revision Table

iLogic to Rotate a Revision Table

Anonymous
Not applicable
836 Views
6 Replies
Message 1 of 7

iLogic to Rotate a Revision Table

Anonymous
Not applicable

Hi all,

 

I've recently created a new drawing sheet format, that includes a vertical (90deg rotated) revision table. Each time I double click on the sheet in the Sheet formats folder, to create a new sheet the new sheet's revision block / table returns to the normal orientation as opposed to being vertical.

 

I think in order to rectify this I'll need a ilogic rule of sorts to rotate the table. 

 

Thanks in advance for the help!

0 Likes
837 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

PS: I have a small code that moves the table according to the page size, so I was thinking the angle can be specified with that?

 

 

If ActiveSheet.Size ="A2" Then
PointX = (ActiveSheet.Width/10) - 8 - 1
PointY = 18.6 + 1
End If


If ActiveSheet.Size ="A1" Then
PointX = (ActiveSheet.Width/10) - 8 - 2
PointY = 18.6 + 2
End If


If ActiveSheet.Size ="A0" Then
PointX = (ActiveSheet.Width/10) - 8 - 2
PointY = 18.6 + 2
End If


Dim oPoint As Point2d
oPoint=ThisApplication.TransientGeometry.Createpoint2d(PointX,PointY)

ActiveSheet.Sheet.RevisionTables.Item("REVISION TABLE").Position=oPoint


InventorVb.DocumentUpdate()
0 Likes
Message 3 of 7

MechMachineMan
Advisor
Advisor

 

oDEG = Degrees of rotation in degrees.

 

ThisApplication.ActiveDocument.ActiveSheet.RevisionTables.Item("REVISION TABLE").Rotation= oDEG * Math.Pi/180


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 4 of 7

Anonymous
Not applicable

Thanks for the reply!

 

I ran the code and it worked once, however I can't seem to change the angle of roation.

 

Coudl you explain the " * Math.Pi/180" part of the code and how I can manipulate it to achieve various angles?

 

 

Thanks again!

0 Likes
Message 5 of 7

Anonymous
Not applicable

Also, is there a way to recall the table's orientation? what I'm thinking to do is write an if statement that says If the table is not equal to 90deg then rotate it

0 Likes
Message 6 of 7

MechMachineMan
Advisor
Advisor
Angle in degrees * Pi/180 = angle in radians.. It's just the conversion factor as the .Rotation Method only accepts angle in radians.

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 7 of 7

Anonymous
Not applicable
Thanks a mil! is there a way to trigger this when a new sheet is created?
0 Likes