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: 

Drawing Sheet Revision - VB.net

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Martin60
1243 Views, 4 Replies

Drawing Sheet Revision - VB.net

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

4 REPLIES 4
Message 2 of 5
Mike.Wohletz
in reply to: Martin60

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

 

Message 3 of 5
Martin60
in reply to: Martin60

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

Message 4 of 5
Martin60
in reply to: Martin60

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.

Message 5 of 5
Anonymous
in reply to: Martin60

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? 😄

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

Post to forums  

Autodesk Design & Make Report