Determine subassembly generated by Framegenerator

Determine subassembly generated by Framegenerator

Anonymous
Not applicable
712 Views
4 Replies
Message 1 of 5

Determine subassembly generated by Framegenerator

Anonymous
Not applicable
is there a way to reliably determine if a subassembly was generated by framegenerator utilizing inventor 2008 API ? I've got my code parsing through the parts and subasseblies, but now I need to segregate which subassembly was generated b y framegenerator verses those that were not.
0 Likes
713 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
You can use the DocumentInterest API to identify documents generated by
Frame Generator (code below). There are 3 types of Frame Generator
documents:

1. Frame (identified by "FrameDoc")
2. Reference part (identified by "SkeletonDoc")
3. Frame member (identified by "FrameMemberDoc")

Sanjay-


Sub FrameGeneratorDocs()

Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument

' Initialize string to Frame Generator Add-in CLSID
Dim strAddInId As String
strAddInId = "{AC211AE0-A7A5-4589-916D-81C529DA6D17}"

If Not oDoc.DocumentInterests.HasInterest(strAddInId) Then
MsgBox "Not a Frame Generator document."
Exit Sub
End If

Dim oDocInterest As DocumentInterest
Set oDocInterest = oDoc.DocumentInterests.Item(strAddInId)

If oDocInterest.Name = "FrameDoc" Then
MsgBox "This is a Frame document."
ElseIf oDocInterest.Name = "SkeletonDoc" Then
MsgBox "This is a Reference document."
ElseIf oDocInterest.Name = "FrameMemberDoc" Then
MsgBox "This is a Frame Member document."
Else
MsgBox "This is an unknown Frame Generator document."
End If

End Sub
Message 3 of 5

freesbee
Collaborator
Collaborator

is anybody aware of a string to identify also "piping" and "cable & harness" documents?

Massimo Frison
CAD R&D // PDM Admin · Hekuma GmbH
0 Likes
Message 4 of 5

freesbee
Collaborator
Collaborator

...well, it looks like they are:

Frame Generator: {AC211AE0-A7A5-4589-916D-81C529DA6D17}

Tube & Pipe: {4D39D5F1-0985-4783-AA5A-FC16C288418C}

Cable & Harness: {C6107C9D-C53F-4323-8768-F65F857F9F5A}

Smiley Wink

Massimo Frison
CAD R&D // PDM Admin · Hekuma GmbH
0 Likes
Message 5 of 5

Maxim-CADman77
Advisor
Advisor
0 Likes