UnIncluding A Skeleton Frame in an idw

UnIncluding A Skeleton Frame in an idw

ASchlaack
Collaborator Collaborator
883 Views
11 Replies
Message 1 of 12

UnIncluding A Skeleton Frame in an idw

ASchlaack
Collaborator
Collaborator

When I place in my assembly that has many parts made using a skeleton, the skeleton shows up and I dont want it to. Ive found a way to get rid of the skeleton manually which is: Where it says "Include All Surfaces" it origanally showed up as the box. I pressed it once and it changed to a check mark, nothing changed in my drawing. But I pressed it again and the check mark disappeared, as did the skeleton. So basically all I had to do was click "Include All Surfaces" twice.

 

original.png

 

Is there a way I can have Inventor automatically do this or just to make it so the skeleton never shows up when I place the view?

Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
0 Likes
Accepted solutions (2)
884 Views
11 Replies
Replies (11)
Message 2 of 12

adam.nagy
Autodesk Support
Autodesk Support

Hi Aaron,

 

Could you please provide a minimal, non-confidential set of documents that can be used to reproduce the behaviour?

 

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 3 of 12

ASchlaack
Collaborator
Collaborator

Here's about the most basic Inventor file I've evr made, but it has the skeleton and ends up doing the same thing as my other file. In the link below is a Jing screencast of what I have to press to turn off the skeleton just to explain it. This one doesn't do what I described in the origanal post but it's the same basic thing, you just don't have to press it an extra time to get rid of the square.

 

http://screencast.com/t/8Dp24Derk

Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
0 Likes
Message 4 of 12

adam.nagy
Autodesk Support
Autodesk Support
Accepted solution

Hi Aaron,

 

Thanks for the sample. I used it in my blog post 🙂

http://adndevblog.typepad.com/manufacturing/2015/04/uninclude-worksurfaces-in-a-drawingview.html

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 5 of 12

ASchlaack
Collaborator
Collaborator

Thanks but I'm not getting it to work.. It's pry an easy fix but I haven't learned about subs or how to use them yet so I'm not sure what the exact issue is.

 

Capture.PNG

Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
0 Likes
Message 6 of 12

adam.nagy
Autodesk Support
Autodesk Support
Accepted solution

You just have to reorganize things a bit for iLogic and remove the "Set" keywords:

Sub Main()
  Dim dv As DrawingView
  dv = ThisApplication.ActiveDocument.SelectSet(1)
  
  Dim doc As AssemblyDocument
  doc = dv.ReferencedDocumentDescriptor.ReferencedDocument
  
  Dim tro As TransientObjects
  tro = ThisApplication.TransientObjects
  
  Dim coll As ObjectCollection
  coll = tro.CreateObjectCollection
  
  Call CollectAllSurfaces(doc.ComponentDefinition.Occurrences, coll)
  
  Dim wsp As WorkSurfaceProxy
  For Each wsp In coll
    Call dv.SetIncludeStatus(wsp, False)
  Next
End Sub

Sub CollectAllSurfaces( _
occs As ComponentOccurrences, coll As ObjectCollection)
  Dim occ As ComponentOccurrence
  For Each occ In occs
    If occ.SubOccurrences.count > 0 Then
      Call CollectAllSurfaces(occ.SubOccurrences, coll)
    End If
    
    If TypeOf occ.Definition Is PartComponentDefinition Then
      Dim pcd As PartComponentDefinition
      pcd = occ.Definition
      
      Dim ws As WorkSurface
      For Each ws In pcd.WorkSurfaces
        Dim wsp As WorkSurfaceProxy
        Call occ.CreateGeometryProxy(ws, wsp)
        Call coll.Add(wsp)
      Next
    End If
  Next
End Sub

Also, since I'm using SelectSet() in the code it will only work if you run the code directly using "Run Rule" and not from the "Edit Rule" dialog which would clear the selection.



Adam Nagy
Autodesk Platform Services
Message 7 of 12

ASchlaack
Collaborator
Collaborator
Even with this code I'm still just getting errors. What "Set" keywords should I remove? My error is saying "The parameter is incorrect."
Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
0 Likes
Message 8 of 12

adam.nagy
Autodesk Support
Autodesk Support

In the last code I pasted I already removed the "Set" keywords.

 

You get an error first time around when you add the code, because of the thing I mentioned, that it will only run properly when you select "Run Rule".

So when you're in the editor and it tries to run it you get that message, but you can ignore that error, and "Cancel" out of the dialog.

 

Once the UI is clear of other dialogs, select the drawing view and click Run Rule:

 

dont-include.png

  



Adam Nagy
Autodesk Platform Services
Message 9 of 12

ASchlaack
Collaborator
Collaborator
Thank you, that's what I wasn't getting. I didn't select the view before running it. Thank you for all your help!!
Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
0 Likes
Message 10 of 12

ASchlaack
Collaborator
Collaborator
Is there anything about this code that can be changed to make it so you can select more then just one view at a time? Or have it run every view everytime?
Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
0 Likes
Message 11 of 12

ASchlaack
Collaborator
Collaborator
Also, is there a way to possibly run this on ipts in a idw aswell?
Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
0 Likes
Message 12 of 12

adam.nagy
Autodesk Support
Autodesk Support
0 Likes