TheSwamp

Code Red => .NET => Topic started by: sdunn on March 15, 2024, 11:08:13 PM

Title: Setting Civil 3D Pipe Fitting Label Style Error
Post by: sdunn on March 15, 2024, 11:08:13 PM
I am getting an "does not fall within the expected range" when trying to change a fitting label style.  The new label styleid is of an existing label style.  Has anyone run into this issue?

Code - C#: [Select]
  1. if (lab.GetType() == labSource.GetType())
  2. {      
  3.         if (Oid.ObjectClass.DxfName == "AECC_FITTING_LABEL")
  4.         {
  5.                 lab.StyleId = labSource.StyleId;
  6.         }
  7. }
Title: Re: Setting Civil 3D Pipe Fitting Label Style Error
Post by: Jeff_M on March 17, 2024, 12:42:11 AM
Stacy, I see the same thing and have not found a resolution.
Title: Re: Setting Civil 3D Pipe Fitting Label Style Error
Post by: It's Alive! on March 17, 2024, 10:15:41 AM
Can you use 'is derived from'?
Title: Re: Setting Civil 3D Pipe Fitting Label Style Error
Post by: sdunn on March 19, 2024, 02:41:14 PM
I am not sure how to use "is derived from" in this case.  I am checking that the source label is the same type as the selected label before changing its styleid.