iFeature iLogic Workflow

iFeature iLogic Workflow

Anonymous
Not applicable
553 Views
2 Replies
Message 1 of 3

iFeature iLogic Workflow

Anonymous
Not applicable

I could use some help trying to integrate iFeatures into an iLogic code that locates all parts that require CNC machining in a top level assembly.  Currently, the code looks at all of the referenced parts in the assembly and determines whether they have 'extrude cut' or 'hole' features (see line of code below), and then executes some other actions.  Is there a workflow for identifying parts that have iFeautres with extrude cuts or holes?  

 

 If InStr(1, docFeat.ExtendedName, "Cut") > 0 Or InStr(1, docFeat.ExtendedName, "Ø") > 0 Then .....

 

Thanks in advance.

 Niles

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

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

Unfortunately the API doesn’t provide the ability to access which native features were included inside a specific iFeature definition. Once the iFeature is inserted into the part, or even if we check the *.ide file,  we do not know what features compose the iFeature surface body. 

 

What you can know is the parameters which defined the iFeature. Please refer to this blog:

http://adndevblog.typepad.com/manufacturing/2013/07/get-parameters-of-ifeature.html

 

In addition, you could access the Faces property of the iFeature to analyze the geometry created by this feature or check its Parameters collection (depending on which parameters were included in the iFeature definition *.ide) it can give you additional information. 


 

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks for your help Xiaodong, the blog post you created was very useful for figuring out an alternate workflow.  I ended up simply checking to see if there is an active iFeature in the part, rather than trying to see the features or parameters that originally made up the iFeature.  I integrated the following into my code to find the parts that require CNC machining.

 

Try
If InStr(1,docFeat.ExtendedName, "Cut") > 0 Or InStr(1,docFeat.ExtendedName, "Ø") > 0  Then 
                                    
     If Feature.IsActive(docFile.DisplayName & ":1", docFeat.Name) = True Then
           'Feature in this part that requires CNC machining                                        
z=1
End If
End If
Catch If Feature.IsActive(docFile.DisplayName & ":1", dociFeat.Name) = True Then 'iFeature in this part that requires CNC machining
z=1
End If
EndTry

If z = 1 Then .....
0 Likes