DISP_E_MEMBERNOTFOUND error from iLogic

<?xml encoding=”UTF-8″>By Adam Nagy

ILogic_error

If you have an iLogic Rule which is using code that works fine inside a .NET application or AddIn, but throws a DISP_E_MEMBERNOTFOUND error from inside the iLogic Rule, then it could be that you just need to declare a variable using the specific type of the object. E.g. this code:

PartDoc=ThisApplication.ActiveDocument
PartcompDef=PartDoc.ComponentDefinition
ExtFeature=PartcompDef.Features.ExtrudeFeatures.item(1)
<strong>ExtDef=ExtFeature.Definition</strong>
' ...
ExtDef.Profile=ExtProfile

would need to be changed to this:

PartDoc=ThisApplication.ActiveDocument
PartcompDef=PartDoc.ComponentDefinition
ExtFeature=PartcompDef.Features.ExtrudeFeatures.item(1)
<strong>Dim ExtDef As ExtrudeDefinition =ExtFeature.Definition</strong>
' ...
ExtDef.Profile=ExtProfile

 


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading