TsgDXFDimension and ArrowSize

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: admin, support, SDS

Post Reply
Jourde
Posts: 33
Joined: 10 Sep 2004, 10:33
Location: France
Contact:

TsgDXFDimension and ArrowSize

Post by Jourde » 27 Jan 2017, 10:48

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

support
Posts: 2930
Joined: 30 Mar 2005, 11:36
Contact:

Re: TsgDXFDimension and ArrowSize

Post by support » 27 Jan 2017, 13:36

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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply