ilogic rotate and anchor revision table

ilogic rotate and anchor revision table

pschell
Contributor Contributor
690 Views
3 Replies
Message 1 of 4

ilogic rotate and anchor revision table

pschell
Contributor
Contributor

Hello all,

 

I want to write a rule that rotates the revision table counterclockwise 90 degrees.

 

I also need the rule to anchor it in place

0 Likes
Accepted solutions (1)
691 Views
3 Replies
Replies (3)
Message 2 of 4

JaneFan
Autodesk
Autodesk

Hey, 

Please try following code: 

Dim oSheet = ThisDrawing.Sheet("Sheet:1").Sheet
Dim oRT = oSheet.RevisionTables.Item(1)
Dim oTG = ThisApplication.TransientGeometry 
oRT.Position = oTG.CreatePoint2d(10, 10)
oRT.Rotation = 90*PI/180

 




Jane Fan
Inventor/Fusion QA Engineer
0 Likes
Message 3 of 4

pschell
Contributor
Contributor
Accepted solution

@JaneFan,

Thank you for your reply. 

your rule didn't do as i would have hoped but it did inspire me to write this and this does work!

SyntaxEditor Code Snippet

Sub Main CreateRevTable()
	Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
	Dim oRTBs As RevisionTables = oDrawDoc.ActiveSheet.RevisionTables

	' Create the revision table location points
	Dim oLocation As Point2d
	oLocation = ThisApplication.TransientGeometry.CreatePoint2d(55.77, 54.61)

	'add a new table
	Dim oRTB As RevisionTable
	oRTB = oRTBs.Add2(oLocation, True, True, True, "A")
	
	'Rotate Revision Table
	oRTBs.Item(1).Rotation = 90 * Math.PI / 180
	
		
	iLogicVb.UpdateWhenDone = True

End Sub

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

Hello,

@pschell or @JaneFan

 

Do you have any ideas on how to create a rule that will 'pull' my template revision, border, and title block from my computer and insert (or replace depending) to the current drawing?

 

I am very inexperienced with iLogic, and have only worked with inventor on and off starting this year, any help would be appreciated.

 

Thanks in advance

0 Likes