2 Replies Latest reply on Jan 6, 2013 5:50 PM by Artem Taturevych

    Delete line dimension

    Joecel Torres

      Hi All,


      How can i delete a dimension of a line w/o selecting it first?

      Is there a function like ModelDoc2:: SketchConstraintsDel where in you just need to select the line to delete the constraint?



        • Re: Delete line dimension
          K. C

          Select the sketch and delete



          Set Part = swApp.ActiveDoc

          boolstatus = Part.Extension.SelectByID2("D1@Sketch1@Part1.SLDPRT", "DIMENSION", 2.59476034393162E-02, 0.034195848241218, 0, False, 0, Nothing, 0)



          End Sub




          • Re: Delete line dimension
            Artem Taturevych

            I haven't found a method to get the dimension from segment. You should work in opposite direction: traverse all dimensions in the sketch: Feature::GetFirstDisplayDimension->Feature::GetNextDisplayDimension and get the attached entities from every dimension to find the dimension which is attached to you line: IDisplayDimension::GetAnnotation->Annotation::GetAttachedEntities3. Then select and delete this dimension.



            Artem Taturevych

            Application Engineer at Intercad


            Tel: +61 2 9454 4444