Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flange Feature bend radius though API

1 REPLY 1
SOLVED
Reply
Message 1 of 2
cadsupport
720 Views, 1 Reply

Flange Feature bend radius though API

Hi all,

 

I'm trying to access the bend radius of an existing flange.

PartDocument _activeDoc = m_inventorApplication.ActiveDocument as PartDocument;

            if (_activeDoc.ComponentDefinition.Type == ObjectTypeEnum.kSheetMetalComponentDefinitionObject)
            {
                SheetMetalComponentDefinition _partDef = _activeDoc.ComponentDefinition as SheetMetalComponentDefinition;
                PartFeatures _features = _partDef.Features;
                
                
                foreach (PartFeature _feature in _features)
                {
                    switch (_feature.Type)
                    {
                        case ObjectTypeEnum.kFlangeFeatureObject:

                            FlangeFeature _flange = _feature as FlangeFeature;
                            MessageBox.Show(_flange.Definition.BendRadius.ToString());

                           
                            break;

                        default:
                            break;
                    }
                }

                return true;

            }
            return false;
        }



    }

In this case MessageBox will return a System._ComObject.

 

 I also tried reading from the flange feature itself, but this will give me "Not implemented" exceptions for _flange.Parameters or even _flange.ExtendedName.

 

 

Best regards

Erik

1 REPLY 1
Message 2 of 2
cadsupport
in reply to: cadsupport

Got it. BendRadius needs to be casted as Parameter.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report