Is there a way to test for frame generated members:

Is there a way to test for frame generated members:

G60Dub
Advocate Advocate
565 Views
5 Replies
Message 1 of 6

Is there a way to test for frame generated members:

G60Dub
Advocate
Advocate

Hi

 

This is my first post in this forum so please be gentle.   I've been using Inventor Pro solidly since 2012 but recently added administering vault, Library authoring and ILogic to my responsibilities. 

 

I'm very new to VB.Net but have some prior programming experience in C++/Pascal etc.

 

I have authored some basic rules that are triggered on particular document saves to force the user to populate various iProperties.

 

There are instances where I do not want this rule to run - etc Library parts which I have already figured out by testing if the part is readonly.

 

However what I am presently stuck on is preventing the rule being ran on frame generated members - so..... is there a way to test if a part has been placed via frame generator or is a frame member? 

0 Likes
566 Views
5 Replies
Replies (5)
Message 2 of 6

HermJan.Otterman
Advisor
Advisor

hello ,

 

In frame generator occurrences is an attributeset with the name "com.autodesk.fg"

you can check for that....

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 3 of 6

Anonymous
Not applicable

Herm,

   Nice find. Only difference I found was the frame generator also uses and OccurenceType of ObjectTypeEnum Enumerator

kComponentOccurrenceProxyObject

 I am not sure Iparts use this also.

.  I am curious as to where this might be documented. I searched for frame and generator in the API references and could not find anything.

or is this something I need that experience thing for??

 

 

0 Likes
Message 4 of 6

HermJan.Otterman
Advisor
Advisor

the proxy object is the representative in the assembly of that part.

I think that the FG stands for Frame Generator and I did not see it in iParts... (create an iPart and look for it..)

documentation is hard to come by if there is any...

it look like every frame generator part has this attributeset, so why not use it.

 

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


Message 5 of 6

G60Dub
Advocate
Advocate

Hi guys

 

Many thanks for you input; at the moment this is beyond my abilities to code this from scratch so I will spend some time reading through the API guide in Inventor in order to get to grips with the basics.

 

 

0 Likes
Message 6 of 6

JaneFan
Autodesk
Autodesk

Hello Alan, 

 

Herm is totally correct. Please use the attribute in the occurrence to do the judgement. You may want to write a search function to go through the attribute sets in the occurrence in the occurrence. Here is a hint about getting the attributesets of the occurrence:  

For Each oOcc In oDoc.ComponentDefinition.Occurrences
If oOcc.AttributeSets.Item(1).Name = "com.autodesk.FG" Then
'...
End If
Next




Jane Fan
Inventor/Fusion QA Engineer
0 Likes