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
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
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
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.
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
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
do you know how to delete a derived part in inventor using ilogic rules ?
WHEN I DELETE A FEATURE THE SKETCH DOESNT DELETE ,
I NEED THE CODE TO DELETE A ESPECIFIC SKETCH
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
@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