1 Reply Latest reply on Dec 23, 2013 7:12 PM by Artem Taturevych

    Difference between suppressed and lightweight(unresolved)?

    Tony Hong

      Hi guys,

       

      I am developing a c# function to iterate a design tree to retrieve the property values for all the components. Everything works fine until I encounter an issue regarding suppressed components. The following code snippets are used to collect components that are not suppressed:

       

                          varComp = (object[])swADoc.GetComponents(true);

                          if (varComp == null)

                              continue;

       

       

                          int ci = 0;

                          for (ci = 0; ci < varComp.Length; ci++)

                          {

                              Component2 swComp = default(Component2);

                              swComp = (Component2)varComp[ci];

       

       

                              //collect the components that are not suppressed.

       

                              if (!swComp.IsSuppressed())

                                  lstPartsInAssy.Add(swComp.GetPathName());

                          }

       

      It works when the components are suppressed.

      However, when the components are lightweight or unresolved, they are considered to be suppressed and not counted at all...

       

      Can anyone please let me know the reason or solution?

       

      Thanks

      Tony