Content Center and Plates/Gussets

Content Center and Plates/Gussets

floccipier
Advocate Advocate
411 Views
2 Replies
Message 1 of 3

Content Center and Plates/Gussets

floccipier
Advocate
Advocate

Hi all, 

I have an elaborate rule that creates views for each frame generated part, I use these conditions to distinguish the frame generated parts:

If oPartDoc.ComponentDefinition.Document.PropertySets.PropertySetExists("ContentCenter") Then
If oPartDoc.ComponentDefinition.IsContentMember Then

'Do something

End If

End if

Problem I'm facing is that all the plates/gussets that I bring into frame do bear these properties as well hence views for those plates are created as well which I don't want (I want these plates to go on separate sheets where I have all my sheet metal parts). Any idea how I can't achieve this?

0 Likes
412 Views
2 Replies
Replies (2)
Message 2 of 3

A.Acheson
Mentor
Mentor

You can check the type of document you have, check the document is a sheetmetal part by checking  sub types.

 

Here are a sample of filters. 

Dim doc As Document = ThisDoc.Document

If doc.DocumentType = Inventor.DocumentTypeEnum.kDrawingDocumentObject  Then
'Drawing File
MessageBox.Show("Drawing", "Title")

Else If doc.DocumentType = Inventor.DocumentTypeEnum.kPartDocumentObject  Then
'Part & Sheet Metal File
    If ThisApplication.ActiveDocument.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" = True Then
        'Sheet Metal File
        MessageBox.Show("Sheet Metal", "Title")
    Else
        'Part File
        MessageBox.Show("Part", "Title")
    End If

Else If doc.DocumentType = Inventor.DocumentTypeEnum.kAssemblyDocumentObject  Then
'Assembly File
MessageBox.Show("Assembly", "Title")

End If

iLogicVb.UpdateWhenDone = True

 https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/find-sheet-metal-part-in-assembly/td-p/...

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 3

floccipier
Advocate
Advocate

@A.Acheson Thanks for your reply. I will test this later today. 

0 Likes