Set dimension style current (active)

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

Moderators: SDS, support, admin

Post Reply
fisad

Set dimension style current (active)

Post by fisad » 21 Apr 2014, 19:59

As can activate a dimensionstyle before drawing a dimension

After opening a file, a new type of dimensionstyle is inserted, after several operations, I need to add a dimension using the style created but the only way to use the new style is inserted immediately before inserting the dimension, thus which is necessary to insert the new style each time a dimension is created.

What is the procedure to activate a style before inserting a dimension?.

Thank you ..

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

Re: Set dimension style current (active)

Post by support » 22 Apr 2014, 11:32

Hello,

The new dimension style should be added to TsgDXFConverter after creation, so it will be possible to retrieve this style from TsgDXFConverter when needed.

The following example shows how to add a dimension style to TsgDXFConverter:

Code: Select all

procedure CreateDimensionStyle;
var
  vDimStyle: TsgDXFDimensionStyle;
begin
  vDimStyle := TsgDXFDimensionStyle.Create;
  ...

  Img.Converter.Sections[csDimStyles].AddEntity(vDimStyle);
  if Assigned(Img.Converter.OnCreate) then
    Img.Converter.OnCreate(vDimStyle);
  Img.Converter.Loads(vDimStyle);
end;
You can use TsgDXFConverter.DimensionStyleByName() function to get a dimension style from TsgDXFConverter.


Mikhail.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply