Rev Table Location

Rev Table Location

Anonymous
Not applicable
683 Views
3 Replies
Message 1 of 4

Rev Table Location

Anonymous
Not applicable

I am currently setting up templates for our company to use and would like to set a default location for the revision table to be as we always want it to be at the left side of the title block.  I don't want to just place it there in the template as it should only display if there is a revision for that drawing.

 

I haven't been able to find a setting that will do this so am thinking about a macro that will automatically run when "Revision Table" is clicked.  If this is indeed the best option, I will need some guidance in what to code as I have had VBA experience in Excel but very little with Inventor.

 

Any ideas?

Thanks!

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

Anonymous
Not applicable
Accepted solution

You will need to get the TitleBlock RangeBox... something like this

 

Dim oSheet As Sheet = thisapplication.ActiveDocument.ActiveSheet

Dim oTB As TitleBlock = oSheet.TitleBlock

 

Dim FinalPoint As Point2d = FriendInventor.TransientGeometry.CreatePoint2d(0, 0)

 

Then you will need to set a reference to your RevBlock, and subtract its MinPoint.X from its MaxPoint.X and then subtract that from the X below.   The Y should be at the same Y as the Titleblock Y I would guess.

 

FinalPoint.X = oTB.RangeBox.MinPoint.X
FinalPoint.Y = oTB.RangeBox.MaxPoint.Y

 

But you will most likely need to make your own button and make your own code to add the RevBlock.  I don't know of any way to tag code onto a existing button press.

0 Likes
Message 3 of 4

Anonymous
Not applicable

I am now trying to move the revision block once it is already been created (for when the sheet size changes).

 

I have tried using the following code and it appears that all the values are correct but the assignment doesn't work.

 

    oSheet.RevisionTables.Item(1).Position.X = pFinalPoint.X
    oSheet.RevisionTables.Item(1).Position.Y = pFinalPoint.Y

 

Any ideas?

0 Likes
Message 4 of 4

Anonymous
Not applicable

Figured it out.  I used this instead:

 

oSheet.RevisionTables.Item(1).Position = pFinalPoint

0 Likes