Author Topic: Setting Civil 3D Pipe Fitting Label Style Error  (Read 271 times)

0 Members and 1 Guest are viewing this topic.

sdunn

  • Newt
  • Posts: 90
Setting Civil 3D Pipe Fitting Label Style Error
« 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. }

Jeff_M

  • King Gator
  • Posts: 4092
  • C3D user & customizer
Re: Setting Civil 3D Pipe Fitting Label Style Error
« Reply #1 on: March 17, 2024, 12:42:11 AM »
Stacy, I see the same thing and have not found a resolution.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8690
  • AKA Daniel
Re: Setting Civil 3D Pipe Fitting Label Style Error
« Reply #2 on: March 17, 2024, 10:15:41 AM »
Can you use 'is derived from'?

sdunn

  • Newt
  • Posts: 90
Re: Setting Civil 3D Pipe Fitting Label Style Error
« Reply #3 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.