Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Numbering scheme for revision table

5 REPLIES 5
Reply
Message 1 of 6
JohanLarsson
355 Views, 5 Replies

Numbering scheme for revision table

Hello,
We have used sketched symbols for our revisions in the past, we want to start using the revision table feature in Inventor 2008. I wrote a small script that reads the info from the sketched symbols and writes it to the revision table.
How do I control the numbering scheme of the revision table?

Code snippet below:

Private Sub SkrivRevision(ByVal aLasUtRevision As Variant)
'Debug.Print aLasUtRevision(1, 1, 1)
Dim oApp As Application
Set oApp = ThisApplication
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = oApp.ActiveDocument
Dim oRevTable As RevisionTable
Dim oTG As TransientGeometry
Set oTG = oApp.TransientGeometry
Set oRevTable = oDrawDoc.ActiveSheet.RevisionTables.Add(oTG.CreatePoint2d(10, 10))
Dim i As Integer
For i = 1 To iMaxRevs
'oRevTable.RevisionTableRows.Add
oRevTable.RevisionTableRows(i).Item(1).Text = aLasUtRevision(1, i, 1) & ""
oRevTable.RevisionTableRows(i).Item(2).Text = aLasUtRevision(2, i, 1) & ""
oRevTable.RevisionTableRows(i).Item(3).Text = aLasUtRevision(3, i, 1) & ""
'Debug.Print sKonvertDate(aLasUtRevision(4, i, 1))
oRevTable.RevisionTableRows(i).Item(4).Text = sKonvertDate(aLasUtRevision(4, i, 1)) & ""
oRevTable.RevisionTableRows(i).Item(5).Text = aLasUtRevision(5, i, 1) & ""
If iMaxRevs - i > 0 Then oRevTable.RevisionTableRows.Add
Next
End Sub
-------------------------------------------------------------------------
Inventor Professional 2012 SP1 (25 seats with subscription)
Windows 7 64 bit
Lenovo D20, 12 GB RAM, Intel Xeon X5687 3.6 GHz, SSD
Quadro 4000, driver 8.17.12.9573, dual monitors
SpacePilot, driver version 6.15.3 Firmware 3.12
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: JohanLarsson

Sorry, control over the numbering scheme is not currently possible via the
API.

Sanjay-

wrote in message news:5719738@discussion.autodesk.com...
Hello,
We have used sketched symbols for our revisions in the past, we want to
start using the revision table feature in Inventor 2008. I wrote a small
script that reads the info from the sketched symbols and writes it to the
revision table.
How do I control the numbering scheme of the revision table?

Code snippet below:

Private Sub SkrivRevision(ByVal aLasUtRevision As Variant)
'Debug.Print aLasUtRevision(1, 1, 1)
Dim oApp As Application
Set oApp = ThisApplication
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = oApp.ActiveDocument
Dim oRevTable As RevisionTable
Dim oTG As TransientGeometry
Set oTG = oApp.TransientGeometry
Set oRevTable =
oDrawDoc.ActiveSheet.RevisionTables.Add(oTG.CreatePoint2d(10, 10))
Dim i As Integer
For i = 1 To iMaxRevs
'oRevTable.RevisionTableRows.Add
oRevTable.RevisionTableRows(i).Item(1).Text = aLasUtRevision(1, i,
1) & ""
oRevTable.RevisionTableRows(i).Item(2).Text = aLasUtRevision(2, i,
1) & ""
oRevTable.RevisionTableRows(i).Item(3).Text = aLasUtRevision(3, i,
1) & ""
'Debug.Print sKonvertDate(aLasUtRevision(4, i, 1))
oRevTable.RevisionTableRows(i).Item(4).Text =
sKonvertDate(aLasUtRevision(4, i, 1)) & ""
oRevTable.RevisionTableRows(i).Item(5).Text = aLasUtRevision(5, i,
1) & ""
If iMaxRevs - i > 0 Then oRevTable.RevisionTableRows.Add
Next
End Sub
Message 3 of 6
JohanLarsson
in reply to: JohanLarsson

Ouch!
Is there any other setting for that, application options etc?
Can I do it via the commandmanager?
I just want to change from the numeric to the alpha option not any custom stuff.
-------------------------------------------------------------------------
Inventor Professional 2012 SP1 (25 seats with subscription)
Windows 7 64 bit
Lenovo D20, 12 GB RAM, Intel Xeon X5687 3.6 GHz, SSD
Quadro 4000, driver 8.17.12.9573, dual monitors
SpacePilot, driver version 6.15.3 Firmware 3.12
Message 4 of 6
Anonymous
in reply to: JohanLarsson

No, not as far as I know.

Sanjay-

wrote in message news:5721019@discussion.autodesk.com...
Ouch!
Is there any other setting for that, application options etc?
Can I do it via the commandmanager?
I just want to change from the numeric to the alpha option not any custom
stuff.
Message 5 of 6
JohanLarsson
in reply to: JohanLarsson

I got some time over and decided to give this a try again.

I found that I can use the commandmanager to open the dialog for insert revision table using the following code:

Dim oInsertRevTable As ControlDefinition
Set oInsertRevTable = oApp.CommandManager.ControlDefinitions.Item("DrawingRevisionTableCmd")
oInsertRevTable.Execute

Is there a way to pass that I want to use alpha for revision so this command places the revision table without showing the dialogue?
If so how do I know what can be passed to a comand (any command)

/Johan
-------------------------------------------------------------------------
Inventor Professional 2012 SP1 (25 seats with subscription)
Windows 7 64 bit
Lenovo D20, 12 GB RAM, Intel Xeon X5687 3.6 GHz, SSD
Quadro 4000, driver 8.17.12.9573, dual monitors
SpacePilot, driver version 6.15.3 Firmware 3.12
Message 6 of 6
Anonymous
in reply to: JohanLarsson

Any way of doing this now in Inventor 2010?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report