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: 

Could somebody help to delete unused work plane by using iLogic Rule?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
zdhrichard
2068 Views, 4 Replies

Could somebody help to delete unused work plane by using iLogic Rule?

When I release part, I want to use iLogic rule to automaticly delete unused work plane (no any dependent) in my *.ipt. The useful work plane need to be keep.

 

I know I can use

          workplane.delet

to delete one plane.

The issue is: how to know whether a work plane has no any dependent.

 

Your help will be much appreciated.

Rich

Autodesk Inventor Professional 2018 (64 Bit Edition)
Build: 284, Release 2018.3
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
4 REPLIES 4
Message 2 of 5
Cadmanto
in reply to: zdhrichard

Rich,

What is the real issue?  Do you have a lot of part files that you inherited and they have excessive work planes and you need to delete them?

Does just turning off the visibility of these work planes not work for you?

 

check.PNGIf this solved your issue please mark this posting "Accept as Solution".

Or if you like something that was said and it was helpful, Kudoskudos.PNG are appreciated. Thanks!!!! Smiley Very Happy

 

New EE Logo.PNG

Inventor.PNG     vault.PNG

 

Best Regards,
Scott McFadden
(Colossians 3:23-25)


Message 3 of 5
mrattray
in reply to: zdhrichard

Did you try checking the Dependents property?

Also, for future questions (please, don't double post), these sort of questions tend to get a better response when posted here: Inventor Customization.

Mike (not Matt) Rattray

Message 4 of 5

Hi zdhrichard,

 

Here is a quick ilogic example that employs mrattray's suggestion to use the Dependents property to check to see if the plane can be deleted.

 

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

 

 

'define document
Dim oDoc As PartDocument
oDoc = ThisDoc.Document
'look at the workplane collection
For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
'skip origin planes
    If oWorkPlane.IsCoordinateSystemElement = True Then
    'do nothing
    Else
    'count the dependents of the workplane
    i = oWorkPlane.Dependents.Count
    'see if the count = 0
        If i =  0 Then
        oWorkPlane.Delete
        Else
        'do nothing
        End If
    End If    
Next

 

Message 5 of 5

It works!

Thanks lot.

Rich

Autodesk Inventor Professional 2018 (64 Bit Edition)
Build: 284, Release 2018.3
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory

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

Post to forums  

Autodesk Design & Make Report