Get the suppress status of Workplane via vb.net

Get the suppress status of Workplane via vb.net

Anonymous
Not applicable
593 Views
2 Replies
Message 1 of 3

Get the suppress status of Workplane via vb.net

Anonymous
Not applicable

Hi to all,

 

following problem. I have a ipt file in my assembly and try to makes some constraints. Everything ios working well, but ther are some supressed workplanes, and I don't want to use them for a automatically created constraint. Is there a way to find out the workplane supress status?

 

Why are they supressed? They are defined on a part feature (extrusion surface). And when I supress that feature, also the Workplane is supressed.

 

But I only can get the visible status. Maybe there's a way to get it about the part feature, but therefore, I have to search for the part feature, and that's also a problem. I cannot get the part feature, who is used for the workplane definition (I think, it's a problem of my knowledge :))

 

Please see attached a small view on the browser whrer you can see the suppressed Planes.

 

Best Regards

 

Passi

0 Likes
Accepted solutions (1)
594 Views
2 Replies
Replies (2)
Message 2 of 3

Vladimir.Ananyev
Alumni
Alumni
Accepted solution

You may find useful Workplane.HealthStatus property:

 

Private Sub Test_IfWorkplanesSuppressed()

  Dim oDoc As PartDocument
  Set oDoc = ThisApplication.ActiveDocument
  Dim odef As PartComponentDefinition
  Set odef = oDoc.ComponentDefinition
  Dim oWPs As WorkPlanes
  Set oWPs = odef.WorkPlanes

  Dim wp As WorkPlane
  Set wp = oWPs.Item(4)  ' <-- some workplane
  Select Case wp.HealthStatus
    Case HealthStatusEnum.kUpToDateHealth
      Debug.Print "Unsuppressed"
    Case HealthStatusEnum.kSuppressedHealth
      Debug.Print "Suppressed"
    End Select
End Sub

 Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 3

Anonymous
Not applicable

Hi,

 

and thanks, that's what I'm searching for.

 

So, it's solved and thank You again.

 

I'm using it a little bit simplified, but the hint with the health status was the thing I needed 🙂

 

Best Regards

 

Passi

 

(And sorry for the late response, but the remembering email was send directly into my junk-mail folder :))

 

0 Likes