Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Linked table over multiple drawing sheets

joe_love-gunn
Contributor

Linked table over multiple drawing sheets

joe_love-gunn
Contributor
Contributor

Hi wondering if anyone can help, In drawings I am doing for work we have to have 2 rev tables in our drawings one called Revisions which has our standard revision table for any changes, and another called Client Revisions which has the table for the revisions as per client request when it is issued to them, both have different data in them as per the revision. Our Revisions table is linked over the whole drawing so that a change on any page is reflected on all pages however our client revision table is not linked and on changing on one page requires tediously deleting and copying the new one throughout all the pages which can be annoying over some drawings being 90 pages long, is it possible to have both tables that have different names linked through the drawing so that when the revisions table is updated it will update throughout, and then when the client table is updated all the client tables will update throughout.

0 Likes
Reply
Accepted solutions (1)
601 Views
7 Replies
Replies (7)

CGBenner
Community Manager
Community Manager

@joe_love-gunn 

Hi, Joe and welcome.

Can you share some details on how each of these is set up, inserted and where the data they are linked to comes from?  eg. Are you using Vault for any of this?


Chris Benner
Industry Community Manager – Design & Manufacturing


If a response answers your question, please use  ACCEPT SOLUTION  to assist other users later.


Also be generous with Likes!  Thank you and enjoy!


Become an Autodesk Fusion Insider
Inventor/Beta Feedback Project
0 Likes

johnsonshiue
Community Manager
Community Manager

Hi Joe,

 

Unfortunately, no, there is no out-of-the-box workflow to do that. iLogic may help but it is not much different than automating the manual process. Inventor's drawing revision table is per sheet basis. Vault's revision table is per file basis. You may want to create a custom general table to capture the revision, aided by an iLogic rule. But you still need to make sure the right data is filled in at the right time. The process of checking isn't trivial either.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

joe_love-gunn
Contributor
Contributor

So all our tables link to inventor iProperties only, our revision table FGS Revisions is a table that links through the drawing, if we edit anything in their it will have the same table throughout, but the client table we currently use is a general table and changes per sheet basis, all information is manually inputed into the table window when we double click on the table. With our revision table the REV number links to the Rev number iProperty, and same with the initials of each designer approved by ect linking to their retrospective iProperties, however the description ect links to no where. The main question is that is it at all possible to set the client revision table to follow the same as the FGS revision table and have it as a table linked to the drawing as can be seen in the Tree with our table being listed as FGS Revisions (Drawing) - <name of table> <assuming linking type/a setting result somewhere> but the client table is in as a general table Client Revisions.

 

I hope that kind of explains things a little better.

 

0 Likes

A.Acheson
Mentor
Mentor
Accepted solution

Hi @joe_love-gunn 

Custom table and revision tables are entirely different objects and unfortunately don't have the same functionality as Johnson has stated. 

 

So their is no automatic solution to your workflow. If you just need to copy the custom table from one sheet to another then you can automate this with an ilogic rule.

 

See this example

 

 

 

Sub Main
		Dim drawDoc As DrawingDocument = ThisDoc.Document
		
		'Set a reference to the active sheet.
		Dim activeSht As Sheet = drawDoc.Sheets.Item(1)
		
		'Set Table Title.
		Dim revTitle As String = "CLIENT REVISIONS"
		
		'Get custom table object.
		Dim clientRevTbl_1 As CustomTable = FindTable(revTitle,activeSht)
		
		'Cycle through each sheet in the drawing.
		For Each sht As Sheet In drawDoc.Sheets
			If sht Is activeSht Then Continue For

			'Look for specified table.
			Dim clientRevTbl_New As CustomTable = FindTable(revTitle,sht)
	
			'Didn't find any client table, so copy one.
			If clientRevTbl_New Is Nothing Then
				clientRevTbl_New = clientRevTbl_1.CopyTo(sht)
				
				'Move Table.
				 MoveTable(clientRevTbl_New, sht)
			End If
		Next
		activeSht.Activate
		MessageBox.Show("All Done adding Rev Block", "iLogic")

	End Sub
	
	'Cycle through each custom table in the drawing.
	Function FindTable(title As String,sht As Sheet) As CustomTable
		For Each customTbl In sht.CustomTables  
			If customTbl.Title = title Then
				Return customTbl
				Exit For
			End If
		Next
	End Function
	
	Sub MoveTable(tbl As CustomTable, sht As Sheet)

		' Height is required if you want to drive by bottom of table.
		Dim tableHeight As Double = tbl.RangeBox.MaxPoint.Y - tbl.RangeBox.MinPoint.Y
		Dim tableWidth As Double = tbl.RangeBox.MaxPoint.X - tbl.RangeBox.MinPoint.X
		Dim titleX As Double = sht.TitleBlock.RangeBox.MaxPoint.X
		Dim titleY As Double = sht.TitleBlock.RangeBox.MaxPoint.Y

		Dim pt As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(titleX - tableWidth, titleY + tableHeight)

		'Move table.
		tbl.Position = pt
	
	End Sub

 

AAcheson_0-1710909588503.png

 

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan

joe_love-gunn
Contributor
Contributor

I see, I have implimented this code with some slight adjustments for when changing paper sizes within the document. When you set the reference as the active sheet, is there a way to set it to the sheet your looking at, so say for example If the first page is A1 and I run the code now it will delete and copy the table from the first page, but when it gets to A3 Pages it ignores them, Is there a way so if on page 3 which is A3 I ran the code it would take the information from that page and go through the sheets so calling on the Active sheet your looking at.

Because from what I understand and from running the code The line of code:
Dim activeSht As Sheet = drawDoc.Sheets.Item(1)
sets the first page as the active sheet I tried calling activeSht as:
Dim activeSht As Sheet = ActiveSheet
and
Dim activeSht As Sheet = drawDoc.Sheets.ActiveSheet
but both throw out errors

Here is the Code I have so far:

0 Likes

joe_love-gunn
Contributor
Contributor

Better view of the code sorry


Sub
Main Dim drawDoc As DrawingDocument = ThisDoc.Document 'Set a reference to the active sheet. Dim activeSht As Sheet = drawDoc.Sheets.Item(1) 'Set Table Title. Dim revTitle As String = "REVISIONS" 'Get custom table object. Dim clientRevTbl_1 As CustomTable = FindTable(revTitle, activeSht) 'Cycle through each sheet in the drawing. For Each sht As Sheet In drawDoc.Sheets If sht Is activeSht Then Continue For 'Checks Sheet Size to the active sheet and if matches continues If sht.Size() = activeSht.Size() Then 'Look for specified table. Dim clientRevTbl_New As CustomTable = FindTable(revTitle,sht) 'Didn't find any client table, so copy one. If clientRevTbl_New Is Nothing Then clientRevTbl_New = clientRevTbl_1.CopyTo(sht) ElseIf clientRevTbl_New Is clientRevTbl_New Then clientRevTbl_New.Delete clientRevTbl_New = clientRevTbl_1.CopyTo(sht) End If End If Next activeSht.Activate MessageBox.Show("All Done adding Rev Block", "iLogic") End Sub 'Cycle through each custom table in the drawing. Function FindTable(title As String,sht As Sheet) As CustomTable For Each customTbl In sht.CustomTables If customTbl.Title = title Then Return customTbl Exit For End If Next End Function
0 Likes

A.Acheson
Mentor
Mentor

Here is the active sheet, see API help for sample. The activesheet property comes from the document  object. 

Syntax

DrawingDocument.ActiveSheet() As Sheet

 

'Set a reference to the active sheet.
		Dim activeSht As Sheet = drawDoc.ActiveSheet

 I'm not in front of a computer so I won't even attempt to implement this in your sample. I would set it up to look at the active sheet, get the rev table object then do something with that object based on sheet size etc. Any trouble implementing just postyour attempt. Happy coding.

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes