- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
check whether part is create by frame generator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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 ----
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Regards,
Arthur Knoors
Autodesk Affiliations:
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: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 !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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 SubAssemlies 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
Best Regards
Wolfgang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
You can check this using document interests method. See this post.
Or if this helped you, please, click (like)
Regards
Alan