PART SUPPRESS INASSEMBLY

Experimenter
Experimenter

HOW TO SUPPRESS THE PART IN ASSEMBLY USING PERAMITRIC MODLING FOR AUTOMATION PUROES IN SOLID EDGE

14 REPLIES

Re: PART SUPPRESS INASSEMBLY

Phenom
Phenom

What do you mean with "Supress"?

 

You could either create a Display Configuration without the Part you would like to "Supress".

 

Or you could use the main Display configuration use Hide // See the screenshot

 

Yasser

display_01.jpg

Re: PART SUPPRESS INASSEMBLY

Phenom
Phenom

No parametric modeling needs to be done for automation purpose.

Unlike features in a part document where you create a suppression variable for controlling visibility, the parts placed in an assembly can be accessed via the Occurrence object having a Visible property which is a Boolean.

 

Hope this answers your query.

 

~Tushar

 

Re: PART SUPPRESS INASSEMBLY

Esteemed Contributor
Esteemed Contributor

@Tushar"can be accessed via the Occurrence object having a Visible property which is a Boolean."

 

Huh? Can you explain that a little further?

Bruce Shand
ST9 MP10 - Insight - Win10 - K4200

Re: PART SUPPRESS INASSEMBLY

Phenom
Phenom

@bshand Based on the very short and severely misspelled post, my interpretation of the question is this:

 

The user wants to show/hide or suppress/unsuppress parts in an assembly via automation.

 

A commonly used method in a Part for suppressing/unsuppressing features is to right-click a feature in the PathFinder and select Add Suppression Variable. This adds a variable to the Variable table in the format "FeatureName_Suppression". A value of either 1 or 0 can be assigned to the suppression variable.

 

Set the value of this suppression variable from a automation programm written in VB.Net, CSharp or C++ to 0 to suppress the feature and 1 to un-suppress the feature.

 

My guess is the user wants to do similar thing in an assembly i.e. show/hide parts or components in the assembly from a VB.Net program. From the automation program, the parts in the assembly can be accesses via the occurrences collection and each occurrence corresponds to a part in the  assembly. The occurrence has a Visible property which can be changed to True or False to show/hide it.

 

I have not tried this out but inferred this based on a glance through the Object Browser in Visual Studio. Only the user can confirm if this is what s/he is looking for.

 

~Tushar

 

Re: PART SUPPRESS INASSEMBLY

Esteemed Contributor
Esteemed Contributor

Thanks. Yeah, I got the suppression variable for parts thing. It was just that one sentence that got me.

Bruce Shand
ST9 MP10 - Insight - Win10 - K4200

Re: PART SUPPRESS INASSEMBLY

Experimenter
Experimenter

YES Mr. Tushar thats what i want, same like in part feature suppress i want to do it in the assembly is there any possibility to do that

Re: PART SUPPRESS INASSEMBLY

Phenom
Phenom

This makes me think of the gag when you talk to fast food speaker all broken up like a bad speaker, and  the order taker repeats back the order perfectly clear.

Re: PART SUPPRESS INASSEMBLY

Phenom
Phenom

@VASA

There is no need to do anything to the assembly or parts in the assembly.

The Visible property can be set to True or False to show/hide the part in assembly.

 

~Tushar

 

Re: PART SUPPRESS INASSEMBLY

Phenom
Phenom

This is how you can do it and as you see there is no need to prepare the assembly:

 

Imports System.Runtime.InteropServices

Imports SolidEdgeFramework

Imports SolidEdgeFrameworkSupport

 

Module Module1

  Public oApp As SolidEdgeFramework.Application

  Public oDoc As SolidEdgeAssembly.AssemblyDocument

 

  Sub Main()

    oApp = Marshal.GetActiveObject("SolidEdge.Application")

    oDoc = oApp.ActiveDocument

 

    Dim oOccs As SolidEdgeAssembly.Occurrences

    Dim oOcc As SolidEdgeAssembly.Occurrence

 

    oOccs = oDoc.Occurrences

    oOcc = oOccs.Item(1)

    'oOcc = oOccs.Item("chead.par:1")

    oOcc.Visible = False 'Or True

  End Sub

End Module