Page 1 of 1

TsgDXFDimension and ArrowSize

Posted: 27 Jan 2017, 10:48
by Jourde
Hi,

i use CadSoftTools since the Version 8.00, I use some TsgDXFDimension. But with the last version 11.0, if i modify the size (ArrowSize or TextHeight) , i got no change, and the arrows and the text are very small.

Did i make a mistake ?

Code: Select all

      dim := TsgDXFDimension.Create;

      dim.DefPoint := MakeFPoint(Xr3, Yr3, 0);
      dim.LinDefPoint1 := MakeFPoint(Xr1, Yr1, 0);
      dim.LinDefPoint2 := MakeFPoint(Xr2, Yr2, 0);
      dim.ArrowSize :=  100;//Taille_Fleche*100;
      dim.TextHeight := 100;//fTaille_Texte_cotations*1000;
      dim.TextPosVert := pvAbove;
      dim.TextOffset := 1;
      dim.Precision := 2;
      dim.SetLType(cont.Img_Travail.Converter.LTypeByName('pointille'));
      dim.Flags:=0;
      dim.ExtLineExt:=1000;

Something else :
In sgFunction, we got some errors with this code who seems not ok ??

Code: Select all

  function GetLeftKnotIndex(const AKnot: Double): Integer;
  var
    I: Integer;
  begin
    Result := 0;
//    for I := AKnots.Count - 1 downto 1 do
    for I := AKnots.Count - 2 downto 0 do       // -> we make this change no ???? because I+1 !
      if (AKnots[I] < AKnots[I + 1]) and (AKnots[I] <= AKnot)
        and (AKnot <= AKnots[I + 1]) then
      begin
        Result := I;// Knot[I] <= AKnot <= Knot[I+1]
        Exit;
      end;
  end;


Best regards

Re: TsgDXFDimension and ArrowSize

Posted: 27 Jan 2017, 13:36
by support
Hello Jourde,

Please check if the given dimension uses some dimension style (TsgDXFDimension.Style), because when you modify the ArrowSize or TextHeight value, it is applied to the actual dimension style.

As for the GetLeftKnotIndex function, does the countdown loop give any error message?


Mikhail