How can I mirror a body/feature by iLogic rule ?

How can I mirror a body/feature by iLogic rule ?

Anonymous
Not applicable
856 Views
1 Reply
Message 1 of 2

How can I mirror a body/feature by iLogic rule ?

Anonymous
Not applicable

Hi everyone,

I'm encountering a problem with the part mirror feature on iLogic.

 

oTO is TransientObjects

oBds is oDef.SurfaceBodies

oMirrs is oFeatures.MirrorFeatures

 

I also precise that there is only 1 solid in my part

 

Here is my code :

Dim ObjectsACopier As ObjectCollection = oTO.CreateObjectCollection
    ObjectsACopier.Add(oBds(1))
Dim MirrDef As MirrorFeatureDefinition = oMirrs.CreateDefinition(ObjectsACopier, oDef.WorkPlanes(2))
Dim CadreOp as MirrorFeature = oMirrs.AddByDefinition(MirrDef)

Which give me this error :

"Erreur non spécifiée (Exception de HRESULT : 0x80004005 (E_FAIL))"

 

Can someone explain me where is my mistake ?

If I'm precise enough, tell me.. i can give more info.

 

Thanks,

 

Windows 7

Inventor 2018

0 Likes
Accepted solutions (1)
857 Views
1 Reply
Reply (1)
Message 2 of 2

JamieVJohnson2
Collaborator
Collaborator
Accepted solution

E-Fail means bad command input, or inappropriate time to run command.  Because that means MANY things, and your code is out of context, you need to make sure the input is good first.  You are going to have to stop the code and verify the input, use msgbox("text") to stop the code, and put in the text something to help you identify and validate.  If the input is good, verify you are using the command correctly (giving it a rock, when it asks for a fruit), and at the right time (mirroring a feature while a drawing document is active).


 

Which give me this error :

"Erreur non spécifiée (Exception de HRESULT : 0x80004005 (E_FAIL))"

 

Can someone explain me where is my mistake ?

If I'm precise enough, tell me.. i can give more info.

 

Thanks,

 

Windows 7

Inventor 2018



the input.  Or use Visual Studio to run and step through you code and view values on the Local's window (but it has to be pure .Net code, so some iLogic may not directly translate).

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes