vb.net list of content center standards

vb.net list of content center standards

snappyjazz
Collaborator Collaborator
1,155 Views
11 Replies
Message 1 of 12

vb.net list of content center standards

snappyjazz
Collaborator
Collaborator

Hello,

Is there a way to access this list of standards through the api? It would be nice to use these standards to help create families for our custom library.

 

image.png

0 Likes
Accepted solutions (2)
1,156 Views
11 Replies
Replies (11)
Message 2 of 12

bradeneuropeArthur
Mentor
Mentor

Yes that is possible!

I need to take a look tomorrow for the code!

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 12

snappyjazz
Collaborator
Collaborator

bump

0 Likes
Message 4 of 12

bradeneuropeArthur
Mentor
Mentor

Almost forgotten:

Public Sub main()
Dim invapp As Inventor.Application = ThisApplication
        Dim oContentCenter As ContentCenter
        oContentCenter = invapp.ContentCenter

        Dim a As ContentTreeViewNode = oContentCenter.TreeViewTopNode

        LoopGetFromTreeView(a)
    End Sub

    Private Sub LoopGetFromTreeView(oContentTreeViewNode As ContentTreeViewNode)

        Dim oContentTreeViewNodeLoop As ContentTreeViewNode
        'Dim strPath As String = b.DisplayName
        Dim strPath As String = oContentTreeViewNode.FullTreeViewPath
        Dim strFam As String = oContentTreeViewNode.DisplayName
        Dim strExport As String = oContentTreeViewNode.DisplayName

        Dim oContentFamily As ContentFamily
        For Each oContentFamily In oContentTreeViewNode.Families

            If oContentFamily.IsModifiable = True Then
                'MsgBox(f.DisplayName)
                strPath = strPath
                strFam = strPath + ":" + oContentFamily.DisplayName

                'strExport = strPath + ":" + oContentFamily.DisplayName + " Standard: " + oContentFamily.Standard '+ " Template: " + oContentFamily.TemplateFileName + " Type: " + oContentFamily.ContentIdentifier
				strExport = oContentFamily.Standard
                'MsgBox(strFam)
                
'MsgBox(strExport)
                WriteText(strExport)
            End If
        Next

        For Each oContentTreeViewNodeLoop In oContentTreeViewNode.ChildNodes

            LoopGetFromTreeView(oContentTreeViewNodeLoop)

        Next
    End Sub

Public Sub WriteText(StrTextToWrite As String)
        Try
            

            Dim FileNameTekstfile As String = Nothing

            Try

                FileNameTekstfile = "StandardInCC"
            Catch ex As Exception

            End Try

            Try
                MkDir("C:\StandardsCC\")
            Catch ex As Exception

            End Try

            Dim FILE_NAME As String = "C:\StandardsCC\ " & FileNameTekstfile & ".txt"

            Dim objWriter As New System.IO.StreamWriter(FILE_NAME, True)

            Try

                objWriter.WriteLine(StrTextToWrite)
            Catch ex As Exception

            End Try

            objWriter.Close()
        Catch ex As Exception

        End Try


    End Sub

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 12

snappyjazz
Collaborator
Collaborator

@bradeneuropeArthur 

Thank you for your help. It would be perfect if I could access the list directly. Is that possible?

0 Likes
Message 6 of 12

bradeneuropeArthur
Mentor
Mentor
  • Don't know what you mean with acces directly?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 7 of 12

Anonymous
Not applicable

What I mean by access directly, is that there is a list I can access. The alternative (indirect) way, is the compile a list by sifting through the families. 

0 Likes
Message 8 of 12

bradeneuropeArthur
Mentor
Mentor

Think not, because the standard is part of the family in the api?

Why is this not sufficient?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 9 of 12

snappyjazz
Collaborator
Collaborator

My question from the beginning is asking if the list exists. If it does exist, I suspect that its a property of the content center object. For example:

Dim StanList as List(of String) = InvApp.ContentCenter.StandardsList

 

If the list doesn't exist, then going through the families one by one and adding the standard to a list is the next best option. Your code helps with that and I appreciate your help, but it doesn't answer my question.

0 Likes
Message 10 of 12

bradeneuropeArthur
Mentor
Mentor

Still I don't understand exactly what you need.

Could you please explain it a bit more in detail.

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 11 of 12

snappyjazz
Collaborator
Collaborator
Accepted solution

Maybe I'm thinking about this all wrong. Maybe when you click the standards dropdown it quickly scans all of the families and generates the list at that point. Is this the way you understand it?

0 Likes
Message 12 of 12

bradeneuropeArthur
Mentor
Mentor
Accepted solution

I think that your assumption is correct!

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes