revision table style doesn't change the table

revision table style doesn't change the table

c.neutschK4ZB6
Explorer Explorer
270 Views
1 Reply
Message 1 of 2

revision table style doesn't change the table

c.neutschK4ZB6
Explorer
Explorer

I add a rev-table with Ilogic and it works quite ok. The table is created and placed correctly, but the style seems not to work.

 

The style is set correct, but the the view of the table is wrong. If I click the style once again with the mouse, the table is in shown correct style.

 

Where is the problem?

 

Dim oApp As Application
Dim oDoc As DrawingDocument
Dim oSheet As Sheet
Dim oRevTable As RevisionTable
Dim myPoint As Inventor.Point2d
Dim oRevTableId As RevisionTableStyle
Dim oRevStart As String
'Dim oRevTableLayer As Layer
oApp = ThisApplication
oDoc = ThisDoc.Document
oSheet = oDoc.ActiveSheet


If oSheet.RevisionTables.Count = 0 Then
    'MsgBox("There is no RevisionTable on this sheet.") 
	myPoint = oApp.TransientGeometry.CreatePoint2d(0, 0)
	oRevTableId = oDoc.StylesManager.RevisionTableStyles.Item("FW_Revisionstabelle")
	'oRevStart = "00"	
	oRevTable = oSheet.RevisionTables.Add2(myPoint, False, False, False, "00",oRevTableId)
	'oRevTable.Layer = "Titel (ISO)"
	'Exit Sub
End If

cneutschK4ZB6_0-1638878879363.png

 

after clicking the style once again

cneutschK4ZB6_1-1638878928682.png

 

 

0 Likes
271 Views
1 Reply
Reply (1)
Message 2 of 2

A.Acheson
Mentor
Mentor

I am not sure why put trying to target a style that is not the default style on placing fails to work. So if you place a  style as default then reference the style and change it to a new one this works. 

        
	'add a new table
	Dim oRevTable As RevisionTable 
	oRevTable = oSheet.RevisionTables.Add2(oTablePt, False, True, True, "0" )'oLocation
	'Get revision table 
	oRevTable  = oSheet.RevisionTables.Item(1)
	'Get New Style
Dim oRevStyle As RevisionTableStyle
oRevStyle = oDrawDoc.StylesManager.RevisionTableStyles.Item("B Size Revision Table (ANSI)") 'Change RevTable Style oRevTable.Style = oRevStyle

 

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