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