Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Deleting features using iLogic

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Anonymous
3105 Views, 10 Replies

Deleting features using iLogic

I am working on a standard part that has different configurations depending on user inputs into a GUI. Once the user enters all the required parameters, the part is in its final form with all unnecessary features suppresed. I am looking for a way to automate the delete of the suppressed features using a rule and iLogic before the user saves the file. The main reason for doing this is to reduce the file size of the part once it is saved because this same template will be used for hundreds of parts and I dont want to waste unnecessary storage space on suppressed features. Thank you for any help or insight you can give.

 

Cheers,

 

Brett

Kondex Corporation

 

 

10 REPLIES 10
Message 2 of 11
Curtis_Waguespack
in reply to: Anonymous

Hi BrettVD,

 

I didn't find an ilogic function for this, but you can use an API function in the iLogic rule to do this.

Here is a quick example along with a sample file attached.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

oQuestion = MessageBox.Show("Delete the Fillets?", "iLogic",MessageBoxButtons.YesNoCancel)

Dim oFeatures As PartFeatures
oFeatures = ThisApplication.ActiveDocument.ComponentDefinition.Features

If oQuestion = vbyes Then
'delete the fillets
oFeatures("Fillet1").delete
oFeatures("Fillet2").delete
oFeatures("Fillet3").delete
oFeatures("Fillet4").delete
Else
MessageBox.Show("No Fillets were deleted.", "ilogic")
End if

 

Message 3 of 11
Generic
in reply to: Curtis_Waguespack

Ha! Asked this same question a couple different times in the customization forum with no response months and months ago.

 

Finally broke down and started in on learning VB.net just to make some sense of the help file and the plugin tutorial.

 

Thank you kindly Mr. Waguespack, you've gave me a good laugh today.

 

P.S.

This is Hopkins from Vatterott BTW; hope you're doing well Curtis.

Message 4 of 11
Anonymous
in reply to: Curtis_Waguespack

Thanks for the quick response in this regards it works great and helps me delete an average of 25 features from each part. I knew it was going to be something like that but couldn't figure it out.

 

Thanks,

 

Brett

Kondex Corporation

Message 5 of 11

Hi curtis

 

I am Linus kotte

 

i have also some what smae problem like this.

 

i have an 500 assemblies all assemblies having two parts one is stator and rotor different configurations.

 

for example two parts are like one is stator and second one is rotor my requirement is once open an assembly in browser tree two parts(stator and rotor) are visible then open first part stator save as into some folder like in stator folder.

 

after that second part open and save as into some like rotor folder.

 

sir please automate this process

 

Regards,

LINUS KOTTE

 

 

Message 6 of 11
Anonymous
in reply to: Curtis_Waguespack

do you know how to delete a derived part in inventor using ilogic rules ?

Message 7 of 11
Anonymous
in reply to: Curtis_Waguespack

WHEN I DELETE A FEATURE THE SKETCH DOESNT DELETE  ,

I NEED THE CODE TO DELETE A ESPECIFIC SKETCH

Message 8 of 11
LSA-skan
in reply to: Anonymous

Hi

 

Did you find a solution for deleting a sketch?

 

I have the same problem, an imported stepfile, with 1300+ files which all contains an unused sketch.

 

/LSA-Skan

Message 9 of 11
Anonymous
in reply to: Anonymous

This doesn't work. I keep getting an error when I run this example.

Message 10 of 11
Anonymous
in reply to: Anonymous

I'm just trying to delete a Component Pattern

Message 11 of 11
Curtis_Waguespack
in reply to: Anonymous


@Anonymous wrote:

This doesn't work. I keep getting an error when I run this example.


 


@Anonymous wrote:

I'm just trying to delete a Component Pattern


 

Hi tony.j.maresh,

 

This example is a part file, so it wouldn't apply to an assembly component pattern.

 

As mentioned in the post to, we're using an API function to do delete since iLogic doesn't support this. So with that in mind and since you're attempting to do something different than the original post, I would suggest searching for "Delete Component Pattern" or post a new topic concerning that on the Inventor Customization forum :
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

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

Post to forums  

Autodesk Design & Make Report