check whether part is create by frame generator

check whether part is create by frame generator

Anonymous
Not applicable
1,375 Views
6 Replies
Message 1 of 7

check whether part is create by frame generator

Anonymous
Not applicable

Is it possible through the api to check whether a part has been created through frame generator? I'm trying to filter these parts out of a all referenced documents loop.

0 Likes
1,376 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Hi Craig,

 

We use stock number to skip frame generator parts, but you could use any iproperty.

 

Our frame generator parts contain a stock number.

 

 

We also use the description iproperty so it skips the frame control sketch.

 

SyntaxEditor Code Snippet

'---start iLogic ----

'check for skip it flag
SN = iProperties.Value("Project", "Stock Number")
Desc = iProperties.Value("Project", "Description")

If IsNumeric(SN) = True Then
    Return
    ElseIf Desc = "Frame Control Sketch" Then
    Return
    Else
    """DO something here"""
End If

'---end iLogic ----

 

0 Likes
Message 3 of 7

bradeneuropeArthur
Mentor
Mentor
It has a clasification. You could skip these on clasification = content center member.

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 4 of 7

wolfgang_nickl
Advocate
Advocate

Hello Together,

you can check it with AttribueSets:

 

Sub wnTestFrame()
    Dim ASE As AttributeSetsEnumerator
    Dim Doc As Document
    Set Doc = ThisApplication.ActiveDocument
    Set ASE = Doc.AttributeManager.FindAttributeSets("com.autodesk.FG*", "*", "*")
    If ASE.Count > 0 Then MsgBox "Framegenerator Part/Assembly"
End Sub

Assemlies will be found even if only a subpart or subassemly has the AttributeSet.

 

If yout Need the Information for the single assembly you can check the AttributeSets of the componentdefinition.

 

Best Regards

Wolfgang

Message 5 of 7

J_Dumont
Advocate
Advocate

Hi Wolfgang,

Thanks for your input. The program works well.

I was wondering if you can expand on it.

The issue I have is that if I place a structural member using Place From Content Center directly, your code shows that it was placed by FG.

Is there a way to filter this out and truly only identify those components placed by FG?

 

0 Likes
Message 6 of 7

wolfgang_nickl
Advocate
Advocate

Hello Dumont,

 

sorry, I don't know a property that will tell this.

In a quick view in the local window of vba, I saw that

the AttributSet of Frame elements has two items,

while the Part from ContentCenter has only one.

But I don't know it it behaves that way ever nor

I have code too check this.Screenshot 2023-02-02 162734.png

 

Best Regards

Wolfgang

 

0 Likes
Message 7 of 7

A.Acheson
Mentor
Mentor

You can check this using document interests method. See this post.

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