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: 

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

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
789 Views, 1 Reply

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

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

1 REPLY 1
Message 2 of 2
JamieVJohnson2
in reply to: Anonymous

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).

jvj

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

Post to forums  

Autodesk Design & Make Report