How to hide text in dwg file(just like abviewer)?

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

Moderators: SDS, support, admin

Post Reply
hustwjz
Posts: 9
Joined: 30 Mar 2006, 05:48
Location: China

How to hide text in dwg file(just like abviewer)?

Post by hustwjz » 25 Apr 2006, 07:59

Hi
In Abviewer we can hide text(including the content of Dimension), how can I achieve it? Please give me some example code?
I'm testing it with VCLImport.
There's another question: how can I zoom and pan with left mouse key (just like autocad)?
Thank you

Thought that I found a powerfull CAD tool, keep on testing.....

SDS
Posts: 21
Joined: 12 Mar 2004, 11:16
Location: Russia
Contact:

Post by SDS » 26 Apr 2006, 15:45

Hello,

<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> In Abviewer we can hide text(including the content of Dimension), how can I achieve it? Please give me some example code?<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
It is nesessray to use property TsgDXFImage.TextVisible: Boolean.
Set true to show texts.
Set false to hide texts.

<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> There's another question: how can I zoom and pan with left mouse key (just like autocad)? <hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
The following code is taken from the Viewer demo (CADImportVCL: http://www.cadsofttools.com/download/cadimportvcl.zip). This demo is available in the ..\cadimportvcl\Delphi\Demos\Viewer\.. folder.
<b><u>Zoom</u></b>:

Code: Select all

<b>procedure</b> TForm1.FormMouseWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; <b>var</b> Handled: Boolean);
<b>begin
  if</b> sgPaintBox.Empty <b>or</b> (PageControl1.ActivePage <> TabSheet1) <b>then</b> Exit;
  MousePos := ScrollBox1.ScreenToClient(MousePos);
  sgPaintBox.ChangeScale(False, 0.8, MousePos);
  Handled := True;
<b>end</b>;

<b>procedure</b> TForm1.FormMouseWheelUp(Sender: TObject; Shift: TShiftState; MousePos: TPoint; <b>var</b> Handled: Boolean);
<b>begin
  if</b> sgPaintBox.Empty <b>or</b> (PageControl1.ActivePage <> TabSheet1) <b>then</b> Exit;
  MousePos := ScrollBox1.ScreenToClient(MousePos);
  sgPaintBox.ChangeScale(False, 1.2, MousePos);
  Handled := True;
<b>end</b>;
<b><u>Pan</u></b>:
It is nesessary to use Drag property of TsgImage object:

Enables or disables moving the picture in scroll window using right mouse button.
<b>property</b> Drag: Boolean;
Description
Default value is True. If Drag = False, you may not move the picture.

Moving is realized by pressing a mouse wheel or left mouse button and dragging.

Dmitry.

Post Reply