Currently writing an application for updating our SQL database drawing register in VB.net.
I cannot find how to acces the the Drawing Sheet Revision.
It is displayed in the drawing sheet from the sheet properties - 'Sheet Revision'
I can read the value from the textbox with 'TitleBlock.GetResultText'
How can I set the value for the 'Sheet Revision'?
Thanks
Solved! Go to Solution.
Solved by Martin60. Go to Solution.
I think that what you are looking for is part of the Inventor Summary Information in the iProperties, I could be wrong.
Public Function ReadiProperty() ' Get the active document. Dim oDoc As Document Set oDoc = ThisApplication.ActiveDocument ' Get the PropertySets object. Dim oPropSets As PropertySets Set oPropSets = oDoc.PropertySets ' Get the design tracking property set. Dim oPropSet As PropertySet Set oPropSet = oPropSets.Item("Inventor Summary Information") Return oPropSet.Item("Revision").Value End Fuction
Hi Mike
Thanks for your reply.
I believe that property is a file property.
What I require varies for each sheet within the idw file.
I am after the property that can be accessed through the Edit Sheet option.
This revision value is per sheet.
I can currently access the other values displayed in this function as property of the sheet
i.e.
For Dim MySheetName as string = MySheet.Name
Each MySheet As Sheet In MyIVDoc.Sheets
I had expected to find a revision property here.
I am about to test using MySheet.RevisionTables to see if I can increment the revision.
The object allows to add a row to the revision table but when I do this in the Inventor Revision Table function it is not associated with a revision.
Also when I change the revision in the Edit Sheet function it appears to be ignored when I add revision in the revision table function.
You can probably tell I am quite confused by the behaviour of the function.
Regards
Martin
i have been able to achieve my objective by using RevisionTable
Dim RevTable As Inventor.RevisionTable = MySheet.RevisionTables.Item(1)
RevTable.RevisionTableRows.Add()
This increments the revision as I require.
I'm having some difficulties achieving this, could you please supply some more information regarding this; or maybe publish an example on how I can add a revision row using VB? 😄