Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Detecting Non-Attached DimensionSets

0 REPLIES 0
Reply
Message 1 of 1
dgesler
1711 Views, 0 Replies

Detecting Non-Attached DimensionSets

I'm having a hard time detecting if dimensions are not attached if they are in a dimensionset, let's say a ChainDImensionSet..

here is my code, and the members always show attached, when they are not according to the GUI and confirmed when I run the Re-Attach menu option.

 

private bool AttachedDimensionSet(Inventor.OrdinateDimensionsEnumerator members)
{
      if (null == members || 0 == members.Count)
      {
          return true;
      }

      foreach (Inventor.OrdinateDimension member in members)
      {
           if (!member.Attached)    // <----------ALWAYS RETURNS TRUE
          {
               return false;
           }
       }

     return true;
 }

 

 

foreach (Inventor.ChainDimensionSet set in sheet.DrawingDimensions.ChainDimensionSets)
{
     if (!AttachedDimensionSet(set.Members))
    {
          set.Delete();
    }
}

 

any help would be appreciated.

 

-Doug

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report