Introduction

This help file is intended to be a base reference to use Powercad, focused on technical specificationa of the components. An extended version which will focuse on the usage of the components both on the design and runtime levels will be introduced soon. Powercad Help is an open project, so any contribution to it will be published in this help file with the credits of the contributor.

Please inform us for any error or suggestion about this document.

www.tekhnelogos.com
support@tekhnelogos.com


Installing In Delphi

Powercad Delphi Package includes 6 components.

TPowerCad | The main Cad component
TCadInterface | The component to embed customizable GUI to the application
TPCBlockDlg | The dialog component to manage blocks
TPCMacroDialog | The dialog component to manage macros
TPCLayerDlg | The dialog component to manage layers
TPCPluginDlg | The dialog component to manage plugins

All these components are included in one package and its name is based on your Delphi Version.

PCD5.dpk | Powercad Package for Delphi 5
PCD6.dpk | Powercad Package for Delphi 6
PCD7.dpk | Powercad Package for Delphi 7

To Install PowerCad Automatically - Using Installation File

PowerCad installation executables can install all needed stuff to your computer including registering the product to your Delphi. For this you should run the proper installation exe for your Delphi version.

The installation executable will copy Powercad files to your computer under the install directory you specified. The installation creates some new directories in your computer.

{Install Dir} \ Docs | Includes the technical documents and help files.
{Install Dir} \ Units | Includes the compiled Delphi units and compiled package.
{Install Dir} \ Source | Includes the Delphi Source files. Limited files in demo and standart version.
{Install Dir} \ PowerDraw | Includes the source files and executable of PowerDraw; a demo application that uses PowerCad.Sample macros,blocks,plugins and drawings are also included under the PowerDraw directory.
{Install Dir} \ Plugin Source | Includes the source files and compiled dlls of sample powercad plugins.

To Install PowerCad Manually

Installing from dpk file
Simply open the related dpk file and install it in your delphi by clicking on the install button of the Package editor.

Installing from bpl file
The bpl file is the compiled binary of your package. You can directly install it using your Delphi Install Packages Dialog.
Simply open the dialog from Delpi Main Menu->Component -> Install Packages option. Add your bpl file using the Add button provided in the dialog.


Installing In Visual Basic

PowerCad OCX Version has one Component.

PowerCad

Besides this it has 4 other embedded dialog components which can be raised by calling its methods. These dialogs are

BlockDialog,MacroDialog,LayerDialog,PluginDialog

To Install PowerCad OCX Automatically - Using Installation File

PowerCad OCX installation executable can install all needed stuff to your computer including registering the product to your VB. For this you should run the ocx installation executable.

The installation executable will copy Powercad files to your computer under the install directory you specified. The installation creates some new directories in your computer.

{Install Dir} \ Docs | Includes the technical documents and help files.
{Install Dir} \ PowerDraw | Includes the source files and executable of PowerDraw; a demo application that uses PowerCad. Sample macros,blocks,plugins and drawings are also included under the PowerDraw directory.
{Install Dir} \ Plugin Source | Includes the source files and compiled dlls of sample powercad plugins. Note that the plugin sources are in Pascal language.


PowerCad in Delphi

Using PowerCad in Delphi

To use Powercad component in Delphi simply drop a TPowerCad component to your form, from PowerCad palatte.

Be sure that Powercad unit (or source) directory is either in the Library Path if Delphi or in the search list of your project.

Add PCTypesUtils uit to your uses list.

uses
  Windows, ....,pcTypesUtils;

Put a button on your form and add this code to its onClick event.

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.SetTool(toFigure,'TLine');
end;

Now when you run your application and press on the Button1, you will be able to draw a line on the Powercad by clicking on the 2 different points.

But here I suggest you a more quick way to test all the features of PowerCad.

Drop a TCadInterface component on your form.

Set its CadControl property as PowerCad1.

On your FormCreate event load the GUI from the distrubuted Normal.dat.
Be sure that the Normal.dat file is in the same directory with your application.

procedure TForm1.FormCreate(Sender: TObject);
begin
  CadInterface1.LoadFromFile(ExtractFilePath(application.exeName)+'\Normal.dat');
end;

Now your applcaiton will have a more professional look, ad you can test all of the features from the menus and toolbars. All the menus and toolbars of teh CadInterface component calls the proper method of the Powercad. Now that you can make your own þnterface and make the calls by your self as we have made an example in the beginning of this topic.

You can get more information about using Powercad if you have a look at the PowerDraw source.


PowerCad in Visual Basic

To use PowerCad OCX in Visual basic, jsut drop the PowerCad control to your form.

Drop a command button on your form and write down this code in its OnClick event.

Private Sub Command1_Click()
 PowerCad1.SetTool toFigure, "TLine"
End Sub

When you run your application and press the Command1 button, you can draw a line on the Powercad by clicking on two different points.

PowerCad OCX doesn't support the automatic GUI feature because of VisualBasic technical specifications. You can build your own toolbuttons and menus and can call the proper method of Powercad. To get more information open the Sample application PowerDrawVb and have a look at how the control is used.


Layers in Powercad

In PowerCad, the user works on the page. The page includes at least one layer. To understand the Layer concept of PowerCad, (if you are not familiar with it from other tools) we can say that a layer is a separate part of the drawing. Think that you have a complex architectural drawing , and you draw the environmental objects (such as trees, ways) on a different paper, the building on a different paper and the electrical plan on a different paper. And let us consider that all these papers are transparent, and when you put them together, you have the complete drawing together. This separate drawings will provide you more effective maintainence of your plan. For instance if you change the electrical plan, you just throw out one paper and draw a new one. But note that each of these transparent papers has the same sizes. Now let us transfer this case to the PowerCad and call these transparent papers as "Layer".

PowerCad has a default layer called "Base Layer". You can not remove or rename the Base Layer. The base layer has got an index as 0. By default, what you draw is in this layer. If you want you can add new layers, you can delete them or you can merge them. And you can save a layer to a separate file. All layers except the base layer are called "user layers".

In most of the method calls, you should send the layer number. The requested operation is handled on the given layer. In PowerCad editor all the operations are handled on the ActiveLayer. ActiveLayer is defined from the Layer dialog or from the ActiveLayer property.

If the ActiveLayer is the Base Layer, the operations are handled through all layers. Because the Base Layer doesn't got a limitation. If you want on a limited layer you should create your own and work on it.

When you work on a layer you can make the others non visible or grayed. A nonvisible layer will not be drawn and a grayed layer will be draw as grayed. The layer dialog provides all layer operations with its grid and menu, but also you can do all layer operations through method calls and property settings.

In the layer dialog, a visible layer will have a "V" letter in the second cell, and a grayed layer will have a F on the third cell. For the opposite cases the letter will not be seen. To make then visible or nonvisibible, and flue or nonflue, just click on these letters in the layer grid.

On the left figure, you can see the layer dialog and the drawn objects. This is a pool drawing from birdlook. The base circle and rectangle, with small rectangles are the stone part of the pool, and the bezier curve in the drawing is the way of the electric cable.

The pool base and the electric cable way is drawn on different layers, so I can gray any of them to work easily on the other. Here I can also make invisible any of the layer.

See Also

Layer Functions , Layer Dialog


Layer Functions

ActiveLayer
LayerCount

NewLayer
DeleteLayer
DeleteLayerWithNbr
DeleteAllUserLayers
ShowLayer
HideLayer
HideAllLayers
GrayLayer
ExGrayLayer
ExHideLayer
ShowAllLayers
MergeAllLayers
MergeVisibleLayers
GetLayerInfo
GetLayer
GetLayerName
GetLayerHandle
GetLayerVisible
GetLayerGrayed


Understanding Page

Enter topic text here.


Coordinate System

Enter topic text here.


Undo Feature

Enter topic text here.


Scale Mapping

Enter topic text here.


Dimensioning

Enter topic text here.


Zoom In Powercad

Enter topic text here.


Printing

Enter topic text here.


Guide Lines

Enter topic text here.


Trace Guides

In PowerCad, Trace Guides provide user lines moving with mouse in different angles. Thus you can draw angled figures more easily. The trace guides can be in 90,60,45,30 angles. The trace guides are controlled with the GuideTrace property. If you don't want to use the trace guides the GuideTrace property should be set to gtNone. In the below figure you can see the mouse moving with the different trace guides. Note that the trace guides dont provide snap feature.

gtNinty | gtSixty | gtFortyFive

See Also

GuideTrace Property , TGuideTraces


Snapping

Enter topic text here.


Scrolling

Enter topic text here.


Customizing

Enter topic text here.


Selecting Figures

Enter topic text here.


Figure Handling

Enter topic text here.


Aligning Figures

Enter topic text here.


Figure Creation

Enter topic text here.


Using And Making Blocks

Enter topic text here.


Joint Lines

In some drawings, some lines are used as bounds among two other fýgures. So when any of these fýgures move the end point of the line should also move to the same location of the figure. We call these lines Joint Lines.

In PowerCad a Line figure or a PolyLine figure can act as a joint line. You can join one of or both of the ends of a line/polyline to other figures. When a line end is joined to any figure a small red cross will be drawn in joined end of the line. (Note that these crosses are guide points of the line)

As you can see on the left figures, the joint line reacts to the figure movements. The line ends insist on saving their locations relative to the figures. Note that the joint ends are marked with the crosses.

To join a line/polyline end on PowerCad editor, drag the end of the line when it is selected, with your mouse (by also pressing shift and ctrl keys together), and drop it on the selection area of the figure you want to joint to.

The selection area of the figure is the area on which you press to select. For instance if you drop the line end inside a non-filled rectangle, it will not be joined. So to make easy joins first fill the figure or drop the line end on the edge of the figures.

Be free to drop it on any location of the figure. Because after you make the join, you can easily change the location of the join end. For instance, consider you have dropped the line end on the center of a circle when joining, and then you can redrag the join end to the edge (or even outside of it) of the circle. It will always remain joined.

To unjoin a line on the PowerCad editor you should use the line popup menu.
To control line joinings through the method calls please use the methods below.

Joint Line Methods

BoundLinePoint
BoundLineToFigures
BoundSelectedLine
UnBoundLine


Brush Patterns

Enter topic text here.


Basic Tools

Enter topic text here.


Select Tool

Enter topic text here.


Line Tool

Enter topic text here.


Rectangle Tool

Enter topic text here.


Circle Tool

Enter topic text here.


Ellipse Tool

Enter topic text here.


Arc Tool

Enter topic text here.


Elliptical Arc Tool

Enter topic text here.


Polyline Tool

Enter topic text here.


Text Tool

Enter topic text here.


Vertex Tool

Enter topic text here.


TextPanel Tool

Enter topic text here.


RichText Tool

Enter topic text here.


Move Tool

Enter topic text here.


Duplicate Tool

Enter topic text here.


Mirror Tool

Enter topic text here.


Rotate Tool

Enter topic text here.


Polar Array Tool

Enter topic text here.


Rectangular Array Tool

Enter topic text here.


TCadInterface

Enter topic text here.


TPCBlockDlg

Enter topic text here.


TPCLayerDlg

Enter topic text here.


TPCMacroDialog

Enter topic text here.


TPCPluginDlg

Enter topic text here.


ActiveFile

ActiveFile Property ::: Public

Specifies which file is opened in the PowerCad.

Delphi syntax:

Property ActiveFile:String;

VB syntax:

Property ActiveFile As String

Description

Use ActiveFile property to get the filename of the current opened file in the Powercad. You can use this property to set the form caption of your application with in the OnFileNameChange event.

Delphi Usage

procedure TForm1.PowerCad1FileNameChange(Sender: TObject);
begin
  Form1.Caption := 'My Application - '+Powercad1.ActiveFile;
end;

VB Usage

Private Sub PowerCad1_FileNameChange()
  Me.Caption = "My Application - " & PowerCad1.ActiveFile
End Sub


ActiveLayer

ActiveLayer Property :: Public

Use this property to set or get the active working layer in Powercad.

Delphi syntax:

Property ActiveLayer: Integer;

VB syntax:

Property ActiveLayer As Long

Description

The ActiveLayer property stands for the index of the current working layer. The value is 0 by default and it represents the background layer. The background layer is a default layer and con not be deleted. When the ActiveLayer is the backgroundlayer, all new figures are created in the background layer, however other user layers can still be accessed to make selections from. When the ActiveLayer is a User layer ( > 0) , all new figures are created in that layer and only the objects that belongs to the active layer can be selected.

Delphi Usage

Powercad1.ActiveLayer := 1;

VB Usage

Powercad1.ActiveLayer = 1

See Also

Layers , LayerCount,


AngularMode

AngularMode Property ::: Public

Use the property to define how the anglular values are considered in verbal commands. 0 is used for Radians, 1 is used for Degrees.

Delphi syntax:

Property AngularMode: Integer;

VB syntax:

Property AngularMode As Long

Description

When AngularMode is 0 the angular values in ExecuteVerbalCommand method will be considered as Radians otherwise as Degrees.

Delphi Usage

Powercad1.AngularMode := 0;
Powercad1.ExecuteVerbalCommand('ROTATE 3.14');

// The same result
Powercad1.AngularMode := 1;
Powercad1.ExecuteVerbalCommand('ROTATE 180');

VB Usage

Powercad1.AngularMode = 0
Powercad1.ExecuteVerbalCommand "ROTATE 3.14"

'The same result
Powercad1.AngularMode = 1
Powercad1.ExecuteVerbalCommand "ROTATE 180"


AutoRefresh

Use the property to enable or disable the Powercad Canvas refresh to user.

Delphi syntax:

Property AutoRefresh: Boolean;

VB syntax:

Property AutoRefresh As Bool

Description

If you want Powercad not to update the screen for a specific time, you can set the AutoRefresh property to False. When AutoRefresh is set to False all operations are done but screen is not updated unless the ManualRefresh method is called. If you set the property True back, the refresh will be done in the first time needed. So after you reactivate the AutoRefresh property, call Refresh method to see your result. By default the AutoRefresh property value is True.

This property is very important in some serial operations through code. Consider that you make some cad operations through Powercad methods such is moving, scaling, rotating. Note that any method call or property set that is related with the view of the drawing will cause a refresh. To avoid autorefresh in each step of your serial actions set the AutoRefresh property to False. In this condition only ManualRefresh call will cause a screen refresh. When you end your serial actions set back the AutoRefresh to true and make a call to Refresh method.In serial operations sometimes we need a refresh to recalculate figure positons, text lengths etc. In this case use ManualRefresh call so that you can refresh the screen even AutoRefresh is set to False.

Locked also is used to enable or disable the screen refresh. The difference is that Locked property locks any possible refresh of the screen including the ManualRefresh method call.

Delphi Usage

Powercad1.AutoRefresh := False;

Powercad1.DoAction1; // pseudo code
Powercad1.DoAction2; // pseudo code
Powercad1.DoAction3; // pseudo code

// refresh is needed
Powercad1.ManualRefresh;

Powercad1.DoAction4; // pseudo code
Powercad1.DoAction5; // pseudo code

Powercad1.AutoRefresh := True;
Powercad1.Refresh; // call this method, otherwise the screen will not be
                   // updated until the first update need

VB Usage

Powercad1.AutoRefresh = False

Powercad1.DoAction1 'pseudo code
Powercad1.DoAction2 'pseudo code
Powercad1.DoAction3 'pseudo code

'refresh is needed
Powercad1.ManualRefresh

Powercad1.DoAction4 'pseudo code
Powercad1.DoAction5 'pseudo code

Powercad1.AutoRefresh = True
Powercad1.Refresh 'call this method, otherwise the screen will not be
                  'updated until the first update need

See Also

AutoRefresh


AutoSelect

AutoSelect Property ::: Published

Use the property to define the auto selection of the figures when they are first created through user interface.

Delphi syntax:

Property AutoSelect: Boolean;

VB syntax:

Property AutoSelect As Bool

Description

If AutoSelect property is True, any figure created through user interface by mouse commands on the canvas, will automatically selected after it is created.

Delphi Usage

Powercad1.AutoSelect := True;

VB Usage

PowerCad1.AutoSelect = True


AutoTilePrint

AutoTilePrint Property ::: Published

Use the property to enable or disable the automatic print tile of the drawing when it exceed the printer paper sizes.

Delphi syntax:

Property AutoTilePrint: Boolean;

VB syntax:

Property AutoTilePrint As Bool

Description

Printing drawings in Powercad provides many ways. You can print drawings to one paper or tiled to multiple papers. Each way has its own method call. But if you set this property to True, Powercad will automatically tile the drawing to multiple printer pages if the drawing size exceeds the printer paper sizes. If the size exceed occures and the AutoTilePrint is set to False, then only the first page will be printed.

Delphi Usage

Powercad1.AutoTilePrint := True;

VB Usage

PowerCad1.AutoTilePrint = True

See Also

Printing, PrintDrawing, PrintByTiling


BackGround

BackGround Property ::: Published

Use the property to define the background color of the work area.

Delphi syntax:

Property Background: TColor;

VB syntax:

Property BackGround As ColorConstants

Description

Use Background property to set the back color of the area that the page is located on.

Note that, this property only used for the outside of the page area. The page color is defined with a different property named PageColor.

Delphi Usage

Powercad1.Background := clWhite;

VB Usage

PowerCad1.Background = vbWhite

Command Usage [ Delphi ]

Powercad1.CurrentColor := clWhite;
Powercad1.ExecuteTbCommand(cBackground);
// Sets the Background property with CurrentColor value.

Command Usage [ VB ]

Powercad1.CurrentColor = vbWhite
Powercad1.ExecuteTbCommand cBackground
'Sets the Background property with the CurrentColor value

See Also

PageColor


BrushPatternCount

Use this array property to get the count of the registered BrushPatterns in PowerCad.

Delphi syntax:

Property BrushPatternCount:Integer;

VB syntax:

This property is not active in OCX.

Description

Use BrushPatternCount to get the count of the registered BrushPatterns in PowerCad.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
var i   : Integer;
    brs : TBitmap;
begin
  For i := 0 to Powercad1.BrushPatternCount-1 do
  begin
    brs := TBitmap(PowerCad1.BrushList[i]);
    brs.SaveToFile('c:\brush'+inttostr(i)+'.bmp');
  end;
end;

VB Usage

This property is not active in OCX.

See Also

Brush Patterns


CenterGuide

CenterGuide Property ::: Published

Use the property to show or hide the vertical and horizontal center lines.

Delphi syntax:

Property CenterGuide: Boolean;

VB syntax:

Property CenterGuide As Bool

Description

The center guides are autmatically drawen lines that are drawen at the vertical and horizontal centers of the page to divide the page into four.

Delphi Usage

Powercad1.CenterGuide := True;

VB Usage

PowerCad1.CenterGuide = True

Command Usage [ Delphi ]

Powercad1.ExecuteTbCommand(cCenterGuide);
// Toggles the CenterGuide Lines visibility

Command Usage [ VB ]

Powercad1.ExecuteTbCommand cCenterGuide
'Toggles the CenterGuide Lines visibility


CurrentColor

CurrentColor Property ::: Public

Use the property to set a color feature of Powercad from ExecuteTBCommand.

Delphi syntax:

Property CurrentColor: TColor;

VB syntax:

Property CurrentColor As ColorConstants

Description

Use CurrentColor property to set the buffer color value before setting any color feature of the Powercad. This property is used with the method ExecuteTBCommand.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.CurrentColor := clRed;
  Powercad1.ExecuteTBCommand(cPenColor);
end;

VB Usage

Private Sub Command1_Click()
 PowerCad1.CurrentColor = vbRed
 PowerCad1.ExecuteTBCommand cPenColor
End Sub


CurrentFileName

CurrentFileName Property ::: Public

Use the property to use a file based feature of Powercad from ExecuteTBCommand.

Delphi syntax:

Property CurrentFileName: String;

VB syntax:

Property CurrentFileName As String

Description

Use CurrentFileName property to set the buffer string value before calling any filename based command. This property is used with the method ExecuteTBCommand.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.CurrentFileName := 'c:\MyBlocks\xBlock.pwb';
  Powercad1.ExecuteTBCommand(cInsertCurrentBlock);
end;

VB Usage

Private Sub Command1_Click()
 PowerCad1.CurrentFileName = "c:\MyBlocks\xBlock.pwb"
 PowerCad1.ExecuteTBCommand cInsertCurrentBlock
End Sub


CurrentFlag

CurrentFlag Property ::: Public

Use the property to set a boolean feature of Powercad from ExecuteTBCommand.

Delphi syntax:

Property CurrentFlag: Boolean;

VB syntax:

Property CurrentFlag As Bool

Description

Use CurrentFlag property to set the buffer boolean value before calling any boolean based command. This property is used with the method ExecuteTBCommand.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.CurrentFlag := True;
  Powercad1.ExecuteTBCommand(cPolyLineClosed);
end;

VB Usage

Private Sub Command1_Click()
 PowerCad1.CurrentFlag = True
 PowerCad1.ExecuteTBCommand cPolyLineClosed
End Sub


CurrentString

CurrentString Property ::: Public

Use the property to set a string feature of Powercad from ExecuteTBCommand.

Delphi syntax:

Property CurrentString: String;

VB syntax:

Property CurrentFlag As String

Description

Use CurrentString property to set the buffer string value before calling any string based command. This property is used with the method ExecuteTBCommand.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.CurrentString := 'Arial';
  Powercad1.ExecuteTBCommand(cFontName);
end;

VB Usage

Private Sub Command1_Click()
 PowerCad1.CurrentString = "Arial"
 PowerCad1.ExecuteTBCommand cFontName
End Sub


CurrentStyle

CurrentStyle Property ::: Public

Use the property to set a style feature of Powercad from ExecuteTBCommand.

Delphi syntax:

Property CurrentStyle: Byte;

VB syntax:

Property CurrentStyle As Byte

Description

Use CurrentStyle property to set the buffer byte value before calling any style based command. This property is used with the method ExecuteTBCommand.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.CurrentStyle := ord(psSolid);
  Powercad1.ExecuteTBCommand(cPenStyle);
end;

VB Usage

Private Sub Command1_Click()
 PowerCad1.CurrentStyle = psSolid
 PowerCad1.ExecuteTBCommand cPenStyle
End Sub


CurrentValue

CurrentValue Property ::: Public

Use the property to set a style feature of Powercad from ExecuteTBCommand.

Delphi syntax:

Property CurrentValue: Double;

VB syntax:

Property CurrentValue As Double

Description

Use CurrentValue property to set the buffer double value before calling any double or integer based command. This property is used with the method ExecuteTBCommand.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.CurrentValue := 2.4;
  Powercad1.ExecuteTBCommand(cTextSize);
end;

VB Usage

Private Sub Command1_Click()
 PowerCad1.CurrentValue = 2.4
 PowerCad1.ExecuteTBCommand cTextSize
End Sub


CustomPopItems

CustomPopItems Property ::: Published

Use the property to add custom pop items to the right-click (context) menu.

Delphi syntax:

Property CustomPopItems: String;

VB syntax:

Property CustomPopItems As String

Description

Add your custom pop items to the context menu seperated with comma (,) . Note that this property is used with the OnPopMenuClicked event.

Delphi Usage

procedure TForm1.FormCreate(Sender: TObject);
begin
  PowerCad1.CustomPopItems := 'About,HowAreYou';
end;

procedure TForm1.PowerCad1PopMenuClicked(Sender: TObject;
  MenuIndex: Integer);
begin
  Case MenuIndex of
    0: // About Clicked
        ShowAboutForm;
    1: // HowAreYou Clicked
        ShowMessage('Thanks, and you!');
  end;
end;

VB Usage

Private Sub Form_Load()
  PowerCad1.CustomPopItems = "'About,HowAreYou"
End Sub

Private Sub PowerCad1_PopMenuClicked(ByVal MenuIndex As Long)
  Select Case MenuIndex
    'About Clicked
    Case 0: ShowAboutForm
    'HowAreYou Clicked
    Case 1: MsgBox "Thanks, and you!"
  End Select
End Sub


DefaultArcStyle

DefaultArcStyle Property ::: Published

Use the property to define which arc style will be used by default when creating arc figures through user interface.

Delphi syntax:

Property DefaultArcStyle: TArcStyle;

VB syntax:

Property DefaultArcStyle As TArcStyle

Description

Use DefaultArcStyle property to set the default style of the arcs when creating them through user interface. Arc styles in Powercad can be applied to circular and elliptical arc figures. The property can be oneof the followings: asOpen, asPie, asChord.

Note that, if you create a figure by its method call then you should provide all of its drawing attributes, however this property is used when users create figures using the mouse commands through the user interface.

A default property as this one, will be changed only by developer code, or user's modify action when there is no figure selected. Applying a modification on a figure attribute when there is no selection will just set the Default value of that feature for the figures that will be created after then. If you set a Default property as this one, when a figure is selected, Powercad changes the related attribute of the figure in addition to changing the default property.

Delphi Usage

Powercad1.DefaultRowStyle := rsSolid

VB Usage

PowerCad1.DefaultRowStyle = rsSolid


DefaultBrushColor

DefaultBrushColor Property ::: Published

Use the property to define which brush color will be used by default when creating figures through user interface.

Delphi syntax:

Property DefaultBrushColor: TColor;

VB syntax:

Property DefaultBrushColor As ColorConstants

Description

Use DefaultBrushColor property to set the default color of the brush when creating figures through user interface. A brush color feature is only active when the figure has a closed region to paint.

Note that, if you create a figure by its method call then you should provide all of its drawing attributes, however this property is used when users create figures using the mouse commands through the user interface.

A default property as this one, will be changed only by developer code, or user's modify action when there is no figure selected. Applying a modification on a figure attribute when there is no selection will just set the Default value of that feature for the figures that will be created after then. If you set a Default property as this one, when a figure is selected, Powercad changes the related attribute of the figure in addition to changing the default property.

Delphi Usage

Powercad1.DefaultBrushColor := clRed;

VB Usage

PowerCad1.DefaultBrushColor = vbRed


DefaultBrushStyle

DefaultBrushStyle Property ::: Published

Use the property to define which brush style will be used by default when creating figures through user interface.

Delphi syntax:

Property DefaultBrushStyle: TBrushStyle;

VB syntax:

Property DefaultBrushStyle As TBrushStyle

Description

Use DefaultBrushStyle property to set the default style of the brush when creating figures through user interface. Brush styles in Powercad can get the standart styles that Windows GDI provides. The possible values can be bsSolid, bsClear, bsHorizontal, bsVertical,bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross both in Delphi and VB. A brush style feature is only active when the figure has a closed region to paint.

Note that, if you create a figure by its method call then you should provide all of its drawing attributes, however this property is used when users create figures using the mouse commands through the user interface.

A default property as this one, will be changed only by developer code, or user's modify action when there is no figure selected. Applying a modification on a figure attribute when there is no selection will just set the Default value of that feature for the figures that will be created after then. If you set a Default property as this one, when a figure is selected, Powercad changes the related attribute of the figure in addition to changing the default property.

Delphi Usage

Powercad1.DefaultBrushStyle := bsCross;

VB Usage

PowerCad1.DefaultBrushStyle = bsCross


DefaultPenColor

DefaultPenColor Property ::: Published

Use the property to define which pen color will be used by default when creating figures through user interface.

Delphi syntax:

Property DefaultPenColor: TColor;

VB syntax:

Property DefaultPenColor As ColorConstants

Description

Use DefaultPenColor property to set the default color of pen when creating figures through user interface.

Note that, if you create a figure by its method call then you should provide all of its drawing attributes, however this property is used when users create figures using the mouse commands through the user interface.

A default property as this one, will be changed only by developer code, or user's modify action when there is no figure selected. Applying a modification on a figure attribute when there is no selection will just set the Default value of that feature for the figures that will be created after then. If you set a Default property as this one, when a figure is selected, Powercad changes the related attribute of the figure in addition to changing the default property.

Delphi Usage

Powercad1.DefaultPenColor := clRed;

VB Usage

PowerCad1.DefaultPenColor = vbRed


DefaultPenStyle

DefaultPenStyle Property ::: Published

Use the property to define which pen style will be used by default when creating figures through user interface.

Delphi syntax:

Property DefaultPenStyle: TPenStyle;

VB syntax:

Property DefaultPenStyle As TPenStyle

Description

Use DefaultPenStyle property to set the default style of the pen when creating figures through user interface. Pen styles in Powercad can get the standart styles that Windows GDI provides. The possible values can be psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear,psInsideFrame both in Delphi and VB.

Note that, if you create a figure by its method call then you should provide all of its drawing attributes, however this property is used when users create figures using the mouse commands through the user interface.

A default property as this one, will be changed only by developer code, or user's modify action when there is no figure selected. Applying a modification on a figure attribute when there is no selection will just set the Default value of that feature for the figures that will be created after then. If you set a Default property as this one, when a figure is selected, Powercad changes the related attribute of the figure in addition to changing the default property.

Delphi Usage

Powercad1.DefaultPenStyle := psDash;

VB Usage

PowerCad1.DefaultPenStyle = psDash


DefaultPenWidth

DefaultPenWidth Property ::: Published

Use the property to define which pen width will be used by default when creating figures through user interface.

Delphi syntax:

Property DefaultPenWidth: Integer;

VB syntax:

Property DefaultPenWidth As Long

Description

Use DefaultPenWidth property to set the default width of the pen when creating figures through user interface. Pen widths in Powercad are considered as pixels as they are in GDI.

Note that, if you create a figure by its method call then you should provide all of its drawing attributes, however this property is used when users create figures using the mouse commands through the user interface.

A default property as this one, will be changed only by developer code, or user's modify action when there is no figure selected. Applying a modification on a figure attribute when there is no selection will just set the Default value of that feature for the figures that will be created after then. If you set a Default property as this one, when a figure is selected, Powercad changes the related attribute of the figure in addition to changing the default property.

Delphi Usage

Powercad1.DefaultPenWidth := 1;

VB Usage

PowerCad1.DefaultPenWidth = 1


DefaultPictureFolder

DefaultPictureFolder Property ::: Published

Use the property to define the picture folder taht will be used by default in the OpenPictureDialog when user inserts picture.

Delphi syntax:

Property DefaultPictureFolder: String;

VB syntax:

Property DefaultPictureFolder As String

Description

Use DefaultPictureFolder property to define the default picture directory that will be shown in the OpenPictureDialog that is raised when the user inserts a picture to the drawing. This property is null string by default, so if you don't set this property, Powercad uses the current directory to start the Open dialog.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.DefaultPictureFolder := 'c:\MyDocuments\Images';
end;

VB Usage

Private Sub Command1_Click()
  Powercad1.DefaultPictureFolder = "c:\MyDocuments\Images"
End Sub


DefaultPLineClosed

DefaultPLineClosed Property ::: Published

Use the property to define wheather the polylines will be closed or not by default, when they are created through user interface.

Delphi syntax:

Property DefaultPLineClosed: Boolean;

VB syntax:

Property DefaultPLineClosed As Bool

Description

Use DefaultPLine closed property to set the default value for the closenes of the polylines when creating through user interface. This property can only be applied to polyline figures. If this property is true then the polylines will be automatically closed when users draw them through the user interface. The close operation is handled by adding an extra line between the first and last point.

Note that, the autoclose snap feature will close the polyline in anyway regardless of this property. The autoclose snap, works when the user moves the mose near the first point of the polyline after 3 points of it are created on the canvas.

A default property as this one, will be changed only by developer code, or user's modify action when there is no figure selected. Applying a modification on a figure attribute when there is no selection will just set the Default value of that feature for the figures that will be created after then. If you set a Default property as this one, when a figure is selected, Powercad changes the related attribute of the figure in addition to changing the default property.

Delphi Usage

Powercad1.DefaultPLineClosed := True;

VB Usage

PowerCad1.DefaultPLineClosed = True


DefaultRowStyle

DefaultRowStyle Property ::: Published

Use the property to define which row style will be used by default when creating figures through user interface.

Delphi syntax:

Property DefaultRowStyle: TRowStyle;

VB syntax:

Property DefaultRowStyle As TRowStyle

Description

Use DefaultRowStyle property to set the default style of the row when creating figures through user interface. Row styles in Powercad can be applied to lines and polylines and provides drawing of rowheads at the ends of lines.

Note that, if you create a figure by its method call then you should provide all of its drawing attributes, however this property is used when users create figures using the mouse commands through the user interface.

A default property as this one, will be changed only by developer code, or user's modify action when there is no figure selected. Applying a modification on a figure attribute when there is no selection will just set the Default value of that feature for the figures that will be created after then. If you set a Default property as this one, when a figure is selected, Powercad changes the related attribute of the figure in addition to changing the default property.

Delphi Usage

Powercad1.DefaultRowStyle := rsSolid

VB Usage

PowerCad1.DefaultRowStyle = rsSolid


DefaultTextHeight

DefaultTextHeight Property ::: Published

Use the property to define the text height value that will be used by default when creating text figures through user interface.

Delphi syntax:

Property DefaultTextHeight: Extended;

VB syntax:

Property DefaultTextHeight As Double

Description

Use DefaultTextHeight property to set the default height of the texts when creating through user interface. Text height property in Powercad can be applied to text objects (TText). The text height values in Powercad is metric, so will be interpretted as millimeter.

Note that, if you create a figure by its method call then you should provide all of its drawing attributes, however this property is used when users create figures using the mouse commands through the user interface.

A default property as this one, will be changed only by developer code, or user's modify action when there is no figure selected. Applying a modification on a figure attribute when there is no selection will just set the Default value of that feature for the figures that will be created after then. If you set a Default property as this one, when a figure is selected, Powercad changes the related attribute of the figure in addition to changing the default property.

Delphi Usage

Powercad1.DefaultTextHeight := 4; //4 millimeters

VB Usage

PowerCad1.DefaultRowStyle = 4 '4 millimeters


DefaultTextRatio

DefaultTextRatio Property ::: Published

Use the property to define the text width ratio value that will be used by default when creating text figures through user interface.

Delphi syntax:

Property DefaultTextRatio: Extended;

VB syntax:

Property DefaultTextRatio As Double

Description

Use DefaultTextRatio property to set the default width ratio of the texts when creating through user interface. Text ratio values in Powercad can be applied to text objects (TText). The text width in Powercad is relative to the text height, so a ratio between height and width is used. This value is 0 by default and this means the best ratio will be used. The ratio is a double value between 0 and 1. If you use 0.8 for Text Width Ratio; the text width for TextHeight of 10 will be 8. The value 0 is strongly recommended for this property.

Note that, if you create a figure by its method call then you should provide all of its drawing attributes, however this property is used when users create figures using the mouse commands through the user interface.

A default property as this one, will be changed only by developer code, or user's modify action when there is no figure selected. Applying a modification on a figure attribute when there is no selection will just set the Default value of that feature for the figures that will be created after then. If you set a Default property as this one, when a figure is selected, Powercad changes the related attribute of the figure in addition to changing the default property.

Delphi Usage

Powercad1.DefaultTextHeight := 4; //4 millimeters
Powercad1.DefaultTextRatio := 0.6;
// The text width will be 2.4 mm

VB Usage

PowerCad1.DefaultRowStyle = 4 '4 millimeters
Powercad1.DefaultTextRatio = 0.6
' The text width will be 2.4 mm


DotsPerMil

DotsPerMil Property :: Public

Use this ReadOnly poperty to get the dpm value of the current view in Powercad.

Delphi syntax:

Property DotsPerMil: Extended;

VB syntax:

Property DotsPerMil As Double

Description

The count of pixels for 1 mm in current view (zoom scale) is the dpm of the drawing and can be retreived from this read only property. The dpm value is calculated by using the ZoomScale and DotsPerMil property.

Delphi Usage

ShowMessage(inttostr(Powercad1.DotsPerMil)+ ' pixels are used for 1 mm at the current zoom view.');

VB Usage

MsgBox Powercad1.DotsPerMil & " pixels are used for 1 mm at the current zoom view."


DotsPerMilOrig

DotsPerMilOrig Property :: Public

Use this property to set or get the count of pixels used for 1 mm in Actual Size Scale (ZoomScale = 100).

Delphi syntax:

Property DotsPerMilOrig: Extended;

VB syntax:

Property DotsPerMilOrig As Double

Description

The count of pixels for 1 mm in Actual Size is 4 by default. It is not recommended to change this value because it is best value that fits all types of screens. The DotsPerMilOrig is used to find the pixel equalivance of a metric value when drawing on the screen.

For example: when DotsPerMilOrig is 4, a 10 mm line will be represented by 40 pixels on the screen when the ZoomScale is 100 (Actual Size). This line will be represented by 20 pixels when the ZoomScale is 50 (Half Size). If the DotsPerMilOrig is set by 6 the screen values of the example line will be 60 and 30 pixels in both zoom conditions.

Delphi Usage

Powercad1.DotsPerMilOrig := 6;

VB Usage

Powercad1.DotsPerMilOrig = 6


DrawingPop

DrawingPop Property ::: Published

Use the property to define wheather the Context Menu will include Drawing Commands.

Delphi syntax:

Property DrawingPop: Boolean;

VB syntax:

Property DrawingPop As Bool

Description

Set the DrawingPop to True if you want the Drawing commands in the Context Menu. The drawing commands that are included in the menu are

Zoom Commands,Order Commands,Group,UnGroup,Rotate,CreateDimlines, ClearDimLines.

DrawingPop property is used if only the PopStyle property is psStandart.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.DrawingPop := True;
end;

VB Usage

Private Sub Command1_Click()
 PowerCad1.DrawingPop = True
End Sub


DrawShadow

DrawShadow Property ::: Published

Use the property to show or hide page shadow of the drawing area.
Delphi syntax:

Property DrawShadow: Boolean;

VB syntax:

Property DrawShadow As Bool

Description

The page shadow in Powercad makes a better sense of the difference between drawing area and the background. You can make it visible or invisible using this property.

Delphi Usage

Powercad1.DrawShadow := True;

VB Usage

PowerCad1.DrawShadow = True

Command Usage [ Delphi ]

Powercad1.ExecuteTbCommand(cDrawShadow);
// Toggles the PageShadow visibility

Command Usage [ VB ]

Powercad1.ExecuteTbCommand cDrawShadow
'Toggles the PageShadow  visibility


FigureCount

FigureCount Property ::: Published

Use this readonly property to get the count of the figures in PowerCad.

Delphi syntax:

Property FigureCount:Integer;

VB syntax:

Property FigureCount As Long

Description

Use the readonly FigureCount property to get the count of the figures in PowerCad. This number will give the count of the items in the figures list. FigureCount property is mostly used to enumarate the figures of Powercad.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
var i      : Integer;
    FName  : String;
    FHandle: Integer;
begin
  For i := 0 to Powercad1.FigureCount-1 do
  begin
    FHandle := Powercad1.FigureGetHandle(i);
    FName := PowerCad1.FigureGetName(FHandle);
    ListBox1.Items.Add(FName);
  end;
end;

VB Usage

Private Sub Command1_Click()
  Dim i As Int
  Dim FName As String
  Dim FHandle as Long

  For i = 0 To Powercad1.FigureCount-1
    FHandle = Powercad1.FigureGetHandle(i)
    FName = Powercad1.FigureGetName(FHandle)
    List1.AddItem FName
  Next i

End Sub


FigureGuides

FigureGuides Property ::: Published

Use the property to enable or disable the drawing of the figure guides.

Delphi syntax:

Property FigureGuides: Boolean;

VB syntax:

Property FigureGuides As Bool

Description

A figure guide is a special element of a figure that is drawing on the screen but not printed. Figure guides are used to help users to give information about the figure such as the center of a circle. If teh FigureGuides property is set to False, figure gudies are not drawn. Note that, in any case figure guides are not printed.

Delphi Usage

Powercad1.FigureGuides := True;

VB Usage

PowerCad1.FigureGuides = True


FileExtension

FileExtension Property ::: Public

Use the property to set the drawing file extension of your Powercad application.

Delphi syntax:

Property FileExtension: String;

VB syntax:

Property FileExtension As String

Description

Use FileExtension property to define the drawing file extension of your Powercad application. Don't use the '.' in the beginning. By default the extension is 'pwd'. If you change the extension with your own, Powercad will use your own extension when saving the drawings. This is an important part of customizing (specializng) your application.

Delphi Usage

Powercad1.FileExtension := 'drw';

VB Usage

PowerCad1.FileExtension = "drw"

See Also

OpenDialogFilter,SaveDialogFilter,Customizing


GridColor

GridColor Property ::: Published

Use the property to define the color of the grids.

Delphi syntax:

Property GridColor: TColor;

VB syntax:

Property GridColor As ColorConstants

Description

Use GridColor property to set the color of the snap grids. By default the GridColor is clSilver.

Delphi Usage

Powercad1.GridColor := clSilver;

VB Usage

PowerCad1.GridColor = vbGray

Command Usage [ Delphi ]

Powercad1.CurrentColor := clSilver;
Powercad1.ExecuteTbCommand(cGridColor);
// Sets the GridColor property with CurrentColor value.

Command Usage [ VB ]

Powercad1.CurrentColor = vbGray
Powercad1.ExecuteTbCommand cGridColor
'Sets the GridColor property with the CurrentColor value

See Also

Grids,GridStep,GridType,SnapToGrids


Grids

Grids Property ::: Published

Use the property to show or hide the grid lines.

Delphi syntax:

Property Grids: Boolean;

VB syntax:

Property Grids As Bool

Description

The grids in Powercad are used to snap object drawing and modifications to repeating horizontal or vertical reference lines. You can show or hide these grids using this Grids property. The step value between grids can be set with the GridStep property.

Delphi Usage

Powercad1.Grids := True;

VB Usage

PowerCad1.Grids = True

Command Usage [ Delphi ]

Powercad1.ExecuteTbCommand(cGrids);
// Toggles the Grid Lines visibility

Command Usage [ VB ]

Powercad1.ExecuteTbCommand cGrids
'Toggles the Grid Lines visibility

See Also

GridStep, GridColor, GridType,SnapToGrids


GridStep

GridStep Property ::: Published

Use the property to define the distance between the grid lines.

Delphi syntax:

Property GridStep: Extended;

VB syntax:

Property GridStep As Double

Description

The distance between the grid lines are defined as millimeters. By default the GridStep value is 5 mm. To change this value you can use the GridStep property.

Delphi Usage

Powercad1.GridStep := 2.5;

VB Usage

PowerCad1.GridStep = 2.5

See Also

Grids, GridType,GridColor,SnapToGrids


GridType

GridType Property ::: Published

Use the property to change the drawing behaviour of the grid lines.

Delphi syntax:

Property GridType: TGridType;

VB syntax:

Property GridType As TGridType

Description

The grids in Powercad are used to snap object drawing and modifications to repeating horizontal or vertical reference lines. You can chnage the type of the grids using this property. See TGridType topic for the values that this property can take. Note that to show/hide the grids you should use the Grids property.

Delphi Usage

Powercad1.GridType := grtLine;

VB Usage

PowerCad1.GridType = grtLine

Command Usage [ Delphi ]

Powercad1.CurrentStyle := ord(grtLine);
Powercad1.ExecuteTbCommand(cGridType);
// Sets the GridType property with the value in CurrentStyle field

Command Usage [ VB ]

Powercad1.CurrentStyle = grtLine
Powercad1.ExecuteTbCommand cGrids
'Sets the GridType property with the value in CurrentStyle field

See Also

GridStep, GridColor, Grids, TGridType,SnapToGrids


GuideColor

GuideColor Property ::: Published

Use the property to define the color of the guide lines.

Delphi syntax:

Property GuideColor: TColor;

VB syntax:

Property GuideColor As ColorConstants

Description

Use GuideColor property to set the color of the guidelines. By default the GuideColor is clGreen.

Delphi Usage

Powercad1.GuideColor := clGreen;

VB Usage

PowerCad1.GuideColor = vbGreen

Command Usage [ Delphi ]

Powercad1.CurrentColor := clGreen;
Powercad1.ExecuteTbCommand(cGuideColor);
// Sets the GuideColor property with CurrentColor value.

Command Usage [ VB ]

Powercad1.CurrentColor = vbGreen
Powercad1.ExecuteTbCommand cGuideColor
'Sets the GuideColor property with the CurrentColor value

See Also

Guide Lines, GuidesVisible, SnapToGuides


GuidesVisible

GuidesVisible Property ::: Published

Use the property to show or hide the guide lines.

Delphi syntax:

Property GuidesVisible: Boolean;

VB syntax:

Property GuidesVisible As Bool

Description

The guidelines in Powercad are used to snap object drawing and modifications to a horizontal or vertical base line. You can show or hide these guidelines using this GuidesVisible property.

Delphi Usage

Powercad1.GuidesVisible := True;

VB Usage

PowerCad1.GuidesVisible = True

Command Usage [ Delphi ]

Powercad1.ExecuteTbCommand(cGuides);
// Toggles the Guide Lines visibility

Command Usage [ VB ]

Powercad1.ExecuteTbCommand cGuides
'Toggles the Guide Lines visibility

See Also

Guide Lines, GuideColor, SnapToGuides


GuideTrace

GuideTrace Property ::: Published

Use the property to define the angle of the cursor guides. To hide the CursorGuides use gtNone value.

Delphi syntax:

Property GuideTrace: TGuideTraces;

VB syntax:

Property PageOrient As TGuideTraces

Description

The GuideTrace property defines the angle of the trace lines which is drawen as vertical and horizontal and following the cursor (mouse). By default the property value is gtNone, so no guide trace is drawen. Note that guide traces do not provide snap feature at the moment. They just guide you to draw through the selected angle or to compare an angle with the selected guidetrace angle.

If you want to draw your own Guide Traces, set the property value as gtCustom. In this way, you should write your own trace drawing code using the event OnCustomGuideTrace.

Delphi Usage

Powercad1.GuideTrace := gtNinty;

VB Usage

PowerCad1.GuideTrace = gtNinty

See Also

Trace Guides, TGuideTraces, OnCustomGuideTrace


HorizontalZero

HorizontalZero Property ::: Published

Use the property to define the origin point and direction of the x axis of the coordinate system.

Delphi syntax:

Property HorizontalZero: THorzZero;

VB syntax:

Property HorizontalZero As THorzZero

Description

Powercad Coordinate system is metric and the origin is positioned in one of the corner of the page (not middle). The increment direction of the coordinate system is from the origin corner to the opposite corner. Ex: If the origin is top left corner, the positive x is to right and the positive y is to bottom. HorizontalZero defines where the x position of the origin is. It can be left or right. For the description of the HorizontalZero options see THorzZero type definitions.

Delphi Usage

Powercad1.HorizontalZero := vzLeft;

VB Usage

PowerCad1.HorizontalZero = vzLeft

See Also

RulerVisible,RulerMode,RulerSystem,Coordinate System,VerticalZero,THorzZero


KeyCommands

KeyCommands Property ::: Published

Use the property to enable or disable the commands of user keyboard strokes (Shortcuts).

Delphi syntax:

Property KeyCommands: Boolean;

VB syntax:

Property KeyCommands As Bool

Description

Powercad has many keyboard shortcuts for handling specific commands or operations. Set KeyCommands Property to True to activate these shortcuts.

Delphi Usage

Powercad1.KeyCommands := True;

VB Usage

PowerCad1.MouseCommands = True


LayerCount

LayerCount Property ::: Published

Use this readonly property to get the count of the layers in PowerCad.

Delphi syntax:

Property LayerCount:Integer;

VB syntax:

Property LayerCount As Long

Description

Use the readonly LayerCount property to get the count of the layers in PowerCad. This number will include also the deafult base layer (background layer), in addition to user layers. If LayerCount is 1; this means only the base layer stands in the Layers list. LayerCount property is mostly used to enumarate the layers of Powercad.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
var i     : Integer;
    LName : String;
begin
  For i := 0 to Powercad1.LayerCount-1 do
  begin
    LName := Powercad1.GetLayerName(i);
    ListBox1.Items.Add(LName);
  end;
end;

VB Usage

Private Sub Command1_Click()
  Dim i As Int
  Dim LName As String

  For i = 0 To Powercad1.LayerCount-1
    LName = Powercad1.GetLayerName(i)
    List1.AddItem LName
  Next i
End Sub

See Also

Layers , ActiveLayer


Locked

Use the property to enable or disable the Powercad Canvas refresh to user.

Delphi syntax:

Property Locked: Boolean;

VB syntax:

Property Locked As Bool

Description

If you want Powercad not to update the screen for a specific time, you can set the Locked property to true. When Powercad is Locked all operations are done but screen is not updated unless the Locked property is set to False back.

AutoRefresh also is used to enable or disable the screen refresh. But AutoRefresh property can not lock the manual refresh of the screen by code, however the Locked property locks any possible refresh of the screen.

Delphi Usage

Powercad1.Locked := True;

VB Usage

PowerCad1.Locked = True

See Also

AutoRefresh


MapScale

MapScale Property ::: Published

MapScale property is used to define the ratio between paper values and real world values.

Delphi syntax:

Property MapScale: Integer;

VB syntax:

Property MapScale As Long

Description

MapScale value is used by Powercad in many features such as dimension tools, ruler drawing, verbal commands etc. The default value is 50.

Delphi Usage

Powercad1.MapScale := 100; // means 1:100

VB Usage

Powercad1.MapScale = 100 'means 1:100

See Also

Scale Mapping, RescaleToMap, Dimensioning


MetricMode

MetricMode Property ::: Public

Use the property to define the verbal command unit.

Delphi syntax:

Property MetricMode: Boolean;

VB syntax:

Property MetricMode As Bool

Description

When MetricMode is True, all coordinate and dimension values send to the ExecuteVerbalCommand method will be considered as meter otherwise centimeter. MetricMode True case is mostly usefull when the RealScale is True.

Delphi Usage

Powercad1.RealScale := False;
Powercad1.MetricMode := False;
Powercad1.ExecuteVerbalCommand('LINE 2,0');
//Draws a line of 2 cm in paper

// The same result
Powercad1.MapScale := 50;
Powercad1.RealScale := True;
Powercad1.MetricMode := True;
Powercad1.ExecuteVerbalCommand('LINE 1,0');

VB Usage

Powercad1.RealScale := False;
Powercad1.MetricMode := False;
Powercad1.ExecuteVerbalCommand "LINE 2,0"
'Draws a line of 2 cm in paper

'The same result
Powercad1.MapScale = 50;
Powercad1.RealScale = True;
Powercad1.MetricMode = True;
Powercad1.ExecuteVerbalCommand "LINE 1,0"


MirrorStraight

MirrorStraight Property ::: Published

Use the property to define Mirror Command behaviour.

Delphi syntax:

Property MirrorStraight: Boolean;

VB syntax:

Property MirrorStraight As Bool

Description

Set the MirrorStraight to True if you want the mirror axis drawen by the user is snapped as vertical or horizontal. If this property is False the mirror axis can be in any angle.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.MirrorStraight := True;
end;

VB Usage

Private Sub Command1_Click()
 PowerCad1.MirrorStraight = True
End Sub


MouseCommands

MouseCommands Property ::: Published

Use the property to enable or disable the commands of user mouse movements

Delphi syntax:

Property MouseCommands: Boolean;

VB syntax:

Property MouseCommands As Bool

Description

Set MouseCommands Property to True to interpret the user mouse clicks on the canvas as CAD commands. If the property is set to False the Canvas will be viewonly and no command such as select,modify,move,draw can be created by mose movements.

Delphi Usage

procedure TForm1.ActivateCanvas(Active:Boolean);
begin
  Powercad1.MouseCommands := Active;
end;

VB Usage

Private Sub ActivateCanvas(Active As Bool)
 PowerCad1.MouseCommands = Active
End Sub


MultiSelect

MultiSelect Property ::: Public

Use the property to enable or disable selecting multiple figures.
Delphi syntax:

Property MultiSelect: Boolean;

VB syntax:

Property MultiSelect As Bool

Description

Powercad drawing editor provides multiple figures to be selected together using the ctrl or shift key with the mouseclick. If you disable the property only one figure will be selected through the editor on the same time. Note that by code you can always make one or more figures selected, this property only deals with the behaviour of selection click. By default the property value is True.

Delphi Usage

Powercad1.MultiSelect := True;

VB Usage

PowerCad1.MultiSelect = True

See Also

Selecting Figures


OpenDialogFilter

OpenDialogFilter Property ::: Public

Use the property to set the filter string of the in-built Powercad OpenDialog.

Delphi syntax:

Property OpenDialogFilter: String;

VB syntax:

Property OpenDialogFilter As String

Description

File Dialog filters include the extension and description of the file types to be opened or saved. Use OpenDialogFilter property to set the filter string of the built-in open dialog in Powercad. This property is used with the FileExtension property. If you change the FileExtension property, you must also change this OpenDialogFilter property with the SaveDialogFilter property. By default the filter is 'PowerCad Drawings|*.pwd'. Please note that the dilaog filetype filters have a general syntax in Delphi to express the description and the extension. If you have more than one type then you should add the other filters seperated with the ';' mark.

Delphi Usage

Powercad1.OpenDialogTitle := 'Open MyDrawApp Drawing';
Powercad1.SaveDialogTitle := 'Save MyDrawApp Drawing';
Powercad1.FileExtension := 'drw';
Powercad1.OpenDialogFilter := 'MyDrawApp Drawings|*.drw';
Powercad1.SaveDialogFilter := 'MyDrawApp Drawings|*.drw';

VB Usage

Powercad1.OpenDialogTitle = "Open MyDrawApp Drawing"
Powercad1.SaveDialogTitle = "Save MyDrawApp Drawing"
Powercad1.FileExtension = "drw'
Powercad1.OpenDialogFilter = "MyDrawApp Drawings|*.drw"
Powercad1.SaveDialogFilter = "MyDrawApp Drawings|*.drw"

See Also

SaveDialogFilter, OpenDialogTitle, SaveDialogTitle, FileExtension, Customizing


OpenDialogTitle

OpenDialogTitle Property ::: Public

Use the property to set the title of the in-built Powercad OpenDialog.

Delphi syntax:

Property OpenDialogTitle: String;

VB syntax:

Property OpenDialogTitle As String

Description

Use OpenDialogTitle property to set the title of the built-in open dialog in Powercad. By default the title is 'Open Drawing'. Here you can use your own application name to customize the application.

Delphi Usage

Powercad1.OpenDialogTitle := 'Open MyDrawApp Drawing';

VB Usage

PowerCad1.OpenDialogTitle = "Open MyDrawApp Drawing"

See Also

SaveDialogTitle, OpenDialogFilter, SaveDialogFilter, FileExtension, Customizing


PageColor

PageColor Property ::: Published

Use the property to define the page color of the work area.

Delphi syntax:

Property PageColor: TColor;

VB syntax:

Property PageColor As ColorConstants

Description

Use PageColor property to set the color of the drawing area.

Note that, this property only used for the inside of the page area. The back color is defined with a different property named Background.

Delphi Usage

Powercad1.PageColor := clWhite;

VB Usage

PowerCad1.PageColor = vbWhite

Command Usage [ Delphi ]

Powercad1.CurrentColor := clWhite;
Powercad1.ExecuteTbCommand(cPageColor);
// Sets the PageColor property with CurrentColor value.

Command Usage [ VB ]

Powercad1.CurrentColor = vbWhite
Powercad1.ExecuteTbCommand cPageColor
'Sets the PageColor property with the CurrentColor value

See Also

Background


PageLayout

PageLayout Property ::: Published

Use the property to set the WorkWidth and WorkHeight values with world standart page dimensions.

Delphi syntax:

Property PageLayout: TPageLayout;

VB syntax:

Property PageLayout As TPageLayout

Description

The PageLayout property includes some options for American and British paper standarts. When the PageLayout property is set with an option, the WorkWidth and WorkHeight property values are automatically set with the selected standart page dimensions.When WorkWidth or WorkHeight properties are set manually, the PageLayout is set automatically to plCustom. To get more information about the options see the type definiton of TPageLayout.

Delphi Usage

Powercad1.PageLayout := plA4;

VB Usage

PowerCad1.PageLayout = plA4

See Also

Page Concept, WorkWidth, WorkHeight, PageOrient, Printing


PageOrient

PageOrient Property ::: Published

Use the property to set the orientation of the work area (page).

Delphi syntax:

Property PageOrient: TPageOrient;

VB syntax:

Property PageOrient As TPageOrient

Description

The PageOrient property defines wheather the page is landscape or portrait. When this property is changed, the workwidth and workheight values are simply replaced. This property is related with the PageLayout property and automatically updated if the page orientation is changed manually by setting the Workwidth and Workheight properties.

Delphi Usage

Powercad1.PageOrient := poPortrait;

VB Usage

PowerCad1.PageOrient = poPortrait

See Also

Page Concept, WorkWidth, WorkHeight, PageLayout, Printing, TPageOrient


PenPattern

PenPattern Property ::: Public

Use this array property to access the registered PenPatterns in PowerCad.

Delphi syntax:

Property PenPattern[Index:Integer]:TPattern;

VB syntax:

This property is not active in OCX.

Description

Use PenPattern array property to access any pattern in the registered PatternList. You can enumurate the Patterns to show your user and assign any of them to any polyline figure. To get the pattern count in the array you should use the PenPatternCount property. The array is 0 based.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
var i   : Integer;
    pat : TPattern;
begin
  For i := 0 to Powercad1.PenPatternCount-1 do
  begin
    pat := PowerCad1.PenPattern[i];
    ListBox1.Items.Add(pat.Name);
  end;
end;

procedure TForm1.ListBox1Click(Sender: TObject);
var i   : Integer;
    xFig: TFigure;
    pat : TPattern;
begin
  pat := Powercad1.PenPattern[ListBox1.ItemIndex];
  For i := 0 to Powercad1.Selection.Count-1 do
  begin
    xFig := TFigure(PowerCad1.Selection[i]);
    if xFig is TPolyline then begin
      TPolyline(xFig).AssignPenPattern(pat);
    end;
  end;
end;

VB Usage

This property is not active in OCX.


PenPatternCount

PenPatternCount Property ::: Public

Use this array property to get the count of the registered PenPatterns in PowerCad.

Delphi syntax:

Property PenPatternCount:Integer;

VB syntax:

This property is not active in OCX.

Description

Use PenPatternCount to get the count of the registered PenPatterns in PowerCad. To access the Patterns you should use the PenPattern property.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
var i   : Integer;
    pat : TPattern;
begin
  For i := 0 to Powercad1.PenPatternCount-1 do
  begin
    pat := PowerCad1.PenPattern[i];
    ListBox1.Items.Add(pat.Name);
  end;
end;

VB Usage

This property is not active in OCX.


PopStyle

PopStyle Property ::: Published

Use the property to define the behaviour of context menu of the canvas.

Delphi syntax:

Property PopStyle: TPopStyle;

VB syntax:

Property PopStyle As TPopStyle

Description

The PopStyle property defines how the right-click (context menu) of the Powercad will be populated. It can have 2 values.

psStandart | The auto context menu is populated with the built in standart commands for managing the application,drawing or figure behaviours. This option works with the DrawingPop property. If the DrawingPop is set False, the general commands related with the drawing such as BringToFront,Align,Group is not included in the context menu.
psNone | The auto context menu is canceled. Use this option if you set your own Popup menu to the control.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
begin
  Powercad1.PopStyle := psStandart;
  Powercad1.DrawingPop := True;
end;

VB Usage

Private Sub Command1_Click()
 PowerCad1.PopStyle = psStandart
 PowerCad1.DrawingPop = True
End Sub


RangeCheck

RangeCheck Property ::: Published

Use the property to enable or disable the screen range check when drawing figures.

Delphi syntax:

Property RangeCheck: Boolean;

VB syntax:

Property RangeCheck As Bool

Description

When drawing figures to the screen, Powercad can skip a figure's drawing if it is not visible in the screen boundries. This done by range check taht defines if the figure is in the range of screen or not. Sometimes this range check may be more expensive then just drawing it. So if you dont want this check but just draw the figure, then set this property to False.

Delphi Usage

Powercad1.RangeCheck := False;

VB Usage

PowerCad1.RangeCheck = False


RealScale

RealScale Property ::: Public

Use the property to enable or disable the RealScale interpretting of Verbal Commands.

Delphi syntax:

Property RealScale: Boolean;

VB syntax:

Property RealScale As Bool

Description

When RealScale is True, all coordinate and dimension values send to the ExecuteVerbalCommand method will be casted as they are real size dimensions. In this case the values are repseneted on the paper after dividing to the MapScale property value.
If you set the RealScale to False, then the dimensions in the Verbal Commands will be considered as they are the paper diemsiosn of teh objects.

Delphi Usage

Powercad1.MapScale := 50;
Powercad1.RealScale := True;
Powercad1.MetricMode := False;
Powercad1.ExecuteVerbalCommand('LINE 100,0');
//Draws a line of 100 cm in real world
//In paper it is 2 cm

// The same result
Powercad1.MapScale := 50;
Powercad1.RealScale := False;
Powercad1.MetricMode := False;
Powercad1.ExecuteVerbalCommand('LINE 2,0');

VB Usage

Powercad1.MapScale := 50;
Powercad1.RealScale := True;
Powercad1.MetricMode := False;
Powercad1.ExecuteVerbalCommand "LINE 100,0"
'Draws a line of 100 cm in real world
'In paper it is 2 cm

'The same result
Powercad1.MapScale = 50;
Powercad1.RealScale = False;
Powercad1.MetricMode = False;
Powercad1.ExecuteVerbalCommand "LINE 2,0"


RecordUndo

RecordUndo Property ::: Published

Use the property to enable or disable the undo recording.

Delphi syntax:

Property RecordUndo: Boolean;

VB syntax:

Property RecordUndo As Bool

Description

Powercad has undo/redo feature to go back previous drawing states. To be able to do this, Powercad records all actions handled on teh canvas by the user. If this property is set to False, Powercad will not record these previously handled actions , so the undo/redo feature will not be active at all. This property works with the UndoCount property.

Delphi Usage

Powercad1.RecordUndo := True;

VB Usage

PowerCad1.RecordUndo = True

See Also

Undo Feature, UndoCount , ClearUndoList, Undo, Redo


RescaleToMap

RescaleToMap Property ::: Published

Use the property to define the behaviour of Powercad about rescaling objects when the MapScale is changed.

Delphi syntax:

Property RescaleToMap: TMapRescale;

VB syntax:

Property RescaleToMap As TMapRescale

Description

Use RescaleToMap property to define the behaviour of Powercad about rescaling objects when the MapScale is changed. Mapscale is a ratio between the figure dimensions on paper and real world. So sometimes changing map scale will also mean to rescale the dimensions on the paper. However sometimes this rescaling is not required.

Example Scenerio:

Consider that you draw the plan of an house. The real world dimensions of it is 20 m x 20 m. When drawing it on the paper, you have used a mapscale 1:100, so the sizes of the house on the paper is 20 cm x 20 cm. You have drawen the plan, however your friend have remainded you the recent company policy about the mapscales that should be used in house plans. Yes consider that the mapscale should be 1:200, not 1:100. Ok the only thing is to change the mapscale property from the application menu, but what about the current drawing. Remember, it is 20 x 20 cm on the paper, so this new mapscale should affect it and change as 10 cm x 10 cm. So when changin the mapscale the drawing can rescale itself automatically. Should it? Sometimes yes sometimes no. In some conditions changing the mapscale doesnt mean a rescale only a number correction. So this property will help you. Define it and so according to its value, when mapscale is changed, Powercad will do no rescale, Powercad will always rescale or Powercad will ask the application user to make the rescale or not.

Delphi Usage

Powercad1.RescaleToMap := rsAlways

VB Usage

PowerCad1.RescaleToMap = rsAlways

See Also

MapScale, Dimensioning, Scale Mapping


RulerColor

RulerColor Property ::: Published

Use the property to define the color of the top and left rulers.

Delphi syntax:

Property RulerColor: TColor;

VB syntax:

Property RulerColor As ColorConstants

Description

Use RulerColor property to set the color of the top and left rulers. By default the RulerColor is clWhite. If you dont need a very clear difference of the ruler and the background then prefer the same color with the background tp keep the goodlooking.

Delphi Usage

Powercad1.RulerColor := clWhite;

VB Usage

PowerCad1.RulerColor = vbWhite

Command Usage [ Delphi ]

Powercad1.CurrentColor := clWhite;
Powercad1.ExecuteTbCommand(cRulerColor);
// Sets the RulerColor property with CurrentColor value.

Command Usage [ VB ]

Powercad1.CurrentColor = vbWhite
Powercad1.ExecuteTbCommand cRulerColor
'Sets the RulerColor property with the CurrentColor value

See Also

RulerVisible, RulerMode, RulerSystem


RulerMode

RulerMode Property ::: Published

Use the property to define wheather the ruler will show paper or world numbers.

Delphi syntax:

Property RulerMode: TRulerMode;

VB syntax:

Property RulerMode As TRulerMode

Description

The ruler in powercad, can either show the paper dimensions or world dimensions. The world dimensions are calculated using the mapscale value. When the RulerMod is rmPage, each ruler step shows the distance on the paper, when the RulerMod is rmWorld each ruler step shows the distance in the real world according to the map scale. Ruler mode also effects the dimension tools. When the mode is set to rmWorld the dimension lines shows the real world measures, otherwise they show the measures on the paper.

Delphi Usage

Powercad1.RulerMode := rmPage

VB Usage

PowerCad1.RulerMode = rmPage

See Also

MapScale , Scale Mapping, Dimensioning, TRulerMode


RulerSystem

RulerSystem Property ::: Published

Use the property to define wheather the ruler will be drawen in metric or inch units.

Delphi syntax:

Property RulerSystem: TRulerSystem;

VB syntax:

Property RulerSystem As TRulerSystem

Description

The ruler in powercad, wheather in page or world mode, can either be drawen in metric or inch units. Not only the ruler but also the dimension lines, are also affected from this property. Also any future feature that is related about dimensions to show to the user will be affected from the property. Note that, PowerCad inside engine always deals with metric dimensions so any method call from code that needs dimension or coordinate values will deal with the numbers in metric system. To have the ruler system in inch units will only afftect the things that the user deals with.

Delphi Usage

Powercad1.RulerSystem := rsMetric;

VB Usage

PowerCad1.RulerSystem = rsMetric

See Also

RulerMode,RulerVisible, Dimensioning, TRulerSystem


RulerVisible

RulerVisible Property ::: Published

Use the property to show or hide the vertical and horizontal rulers.

Delphi syntax:

Property RulerVisible: Boolean;

VB syntax:

Property RulerVisible As Bool

Description

The rulers are drawn to show the coordinates and dimensions of the page. The horizontal ruler is on the top side of the page and the vertical ruler is on the left side of the page. Use this property to show or hide the rulers. The ruler start (0 point) and so the increment direction is defined with the VerticalZero and HorizontalZero properties.

Delphi Usage

Powercad1.RulerVisible := True;

VB Usage

PowerCad1.RulerVisible = True

Command Usage [ Delphi ]

Powercad1.ExecuteTbCommand(cRulerVisible);
// Toggles the Rulers visibility

Command Usage [ VB ]

Powercad1.ExecuteTbCommand cRulerVisible
'Toggles the Rulers visibility

See Also

RulerMode,RulerSystem, Dimensioning, VerticalZero,HorizontalZero


SaveDialogFilter

SaveDialogFilter Property ::: Public

Use the property to set the filter string of the in-built Powercad SaveDialog.

Delphi syntax:

Property SaveDialogFilter: String;

VB syntax:

Property SaveDialogFilter As String

Description

File Dialog filters include the extension and description of the file types to be opened or saved. Use SaveDialogFilter property to set the filter string of the built-in save dialog in Powercad. This property is used with the FileExtension property. If you change the FileExtension property, you must also change this SaveDialogFilter property with the OpenDialogFilter property. By default the filter is 'PowerCad Drawings|*.pwd'. Please note that the dilaog filetype filters have a general syntax in Delphi to express the description and the extension. If you have more than one type then you should add the other filters seperated with the ';' mark.

Delphi Usage

Powercad1.OpenDialogTitle := 'Open MyDrawApp Drawing';
Powercad1.SaveDialogTitle := 'Save MyDrawApp Drawing';
Powercad1.FileExtension := 'drw';
Powercad1.OpenDialogFilter := 'MyDrawApp Drawings|*.drw';
Powercad1.SaveDialogFilter := 'MyDrawApp Drawings|*.drw';

VB Usage

Powercad1.OpenDialogTitle = "Open MyDrawApp Drawing"
Powercad1.SaveDialogTitle = "Save MyDrawApp Drawing"
Powercad1.FileExtension = "drw'
Powercad1.OpenDialogFilter = "MyDrawApp Drawings|*.drw"
Powercad1.SaveDialogFilter = "MyDrawApp Drawings|*.drw"

See Also

OpenDialogFilter, OpenDialogTitle, SaveDialogTitle, FileExtension, Customizing


SaveDialogTitle

SaveDialogTitle Property ::: Public

Use the property to set the title of the in-built Powercad SaveDialog.

Delphi syntax:

Property SaveDialogTitle: String;

VB syntax:

Property SaveDialogTitle As String

Description

Use SaveDialogTitle property to set the title of the built-in save dialog in Powercad. By default the title is 'Save Drawing'. Here you can use your own application name to customize the application.

Delphi Usage

Powercad1.SaveDialogTitle := 'Save MyDrawApp Drawing';

VB Usage

PowerCad1.SaveDialogTitle = "Save MyDrawApp Drawing"

See Also

OpenDialogTitle, OpenDialogFilter, SaveDialogFilter, FileExtension, Customizing


SaveWithPreview

SaveWithPreview Property ::: Published

Use the property to enable or disable the saving of the drawings preview thumb image in the drawing file.

Delphi syntax:

Property SaveWithPreview: Boolean;

VB syntax:

Property SaveWithPreview As Bool

Description

When opening drawings in Powercad, using the standart Powercad open dialog, the dialog can show the preview of the drawing at the right panel of itself. The preivew is a low-res thum image saved in the drawing file, so the preview can only be showed if thsi thumb has been generated when the drawing is saved. Set the SaveWithPreview proeperty True, so that Powercad will generate this thumb image and attach it to the drawing file when saving. If thsi property is False, the drawing file wil not include the preview thumbs, so opendialog will not show the preivew of any file saved when this property is false.

Delphi Usage

Powercad1.SaveWithPreview := True;

VB Usage

PowerCad1.SaveWithPreview = True

See Also

CreatePreviewBitmap


ScrollBars

ScrollBars Property ::: Published

Use the property to enable or disable the scrollbars visibility.

Delphi syntax:

Property ScrollBars: Boolean;

VB syntax:

Property ScrollBars As Bool

Description

The Powercad page scroll bars are not standart windows scroll bars. Powercad draws the scrollbars to its own canvas as graphical. The scrollbars are visible when needed, but if you want never to see the scrollbars then set the Scrollbars property to False.

Delphi Usage

Powercad1.ScrollBars := True;

VB Usage

PowerCad1.ScrollBars = True

See Also

Scrolling


SelectedCount

SelectedCount Property ::: Published

Use this readonly property to get the count of the selected figures in PowerCad.

Delphi syntax:

Property FigureCount:Integer;

VB syntax:

Property FigureCount As Long

Description

Use the readonly SelectedCount property to get the count of the selected figures in PowerCad. This number will give the count of the items in the selection list. SelectionCount property is mostly used to enumarate the selected figures of Powercad.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
var i      : Integer;
    FName  : String;
    FHandle: Integer;
begin
  For i := 0 to Powercad1.SelectedCount-1 do
  begin
    FHandle := Powercad1.GetSelectedHandle(i);
    FName := PowerCad1.FigureGetName(FHandle);
    ListBox1.Items.Add(FName);
  end;
end;

VB Usage

Private Sub Command1_Click()
  Dim i As Int
  Dim FName As String
  Dim FHandle as Long

  For i = 0 To Powercad1.SelectedCount-1
    FHandle = Powercad1.GetSelectedHandle(i)
    FName = Powercad1.FigureGetName(FHandle)
    List1.AddItem FName
  Next i

End Sub

See Also

Layers , ActiveLayer, Selecting Figures, Selection


Selection

Selection Property ::: Public

Use this property to access the selected figures.

Delphi syntax:

Property Selection : TList;

VB syntax:

This property is not active in OCX. Use selection methods to access selected figures in VB.

Description

Use Selection property to access the selected figures in the Powercad. The property gives you the selected figures as TList class, so that you can enumurate the figures. No range check is done in the list index, so before using any of the list item, check the index validity. The list is 0 based. To access selected figures you can also use the selection methods like SelectedCount, GetSelectionHandle, GetSelectionHandes. Since the Selection property is not active in the OCX, you should use these selection methods in VB applications.

Delphi Usage

procedure TForm1.Button1Click(Sender: TObject);
var i   : Integer;
    xFig: TFigure;
begin
  For i := 0 to Powercad1.Selection.Count-1 do
  begin
    xFigure := TFigure(PowerCad1.Selection[i]);
    ListBox1.Items.Add(xFigure.Name);
  end;
end;

VB Usage

This property is not active in OCX. Use selection methods to access selected figures in VB.

See Also

Layers , ActiveLayer, Selecting Figures, SelectedCount


SnapToGrids

SnapToGrids Property ::: Published

Use the property to enable or disable the snapping to grid lines.

Delphi syntax:

Property SnapToGrids: Boolean;

VB syntax:

Property SnapToGrids As Bool

Description

The Grid Lines are used to have a snap reference for figures to be aligned. If you want the figure drawing and modifying snapped to grid lines then set this property to True. By default, The SnapToGrids property is false.

Delphi Usage

Powercad1.SnapToGrids := True;

VB Usage

PowerCad1.SnapToGrids = True

See Also

Snapping, Grids


SnapToGuides

SnapToGuides Property ::: Published

Use the property to enable or disable the snapping to guide lines.

Delphi syntax:

Property SnapToGuides: Boolean;

VB syntax:

Property SnapToGuides As Bool

Description

The Guide Lines are used to have a snap reference for figures to be aligned. If you want the figure drawing and modifying snapped to guide lines then set this property to True. By default, The SnapToGuides property is false.

Delphi Usage

Powercad1.SnapToGuides := True;

VB Usage

PowerCad1.SnapToGuides = True

See Also

Snapping, Guide Lines, GuidesVisible


SnapToNearPoint

SnapToNearPoint Property ::: Published

Use the property to enable or disable the snapping to other figures (the nearest point).

Delphi syntax:

Property SnapToNearPoint: Boolean;

VB syntax:

Property SnapToNearPoint As Bool

Description

Each figure in Powercad has some predefined points to be snapped. So if this property is set to True, you can snap your actions to other figures specific points. Ex: Rectangle corners, line ends, line middle, circle center etc. When a figure is in the scope of the snap area, Powercad uses its standart points to snap the action, if you want the figure to be snapped in custom conditions then you can use the OnSnapToFigure event to make your own calculations between the cursor point and figure geometry.

Delphi Usage

Powercad1.SnapToNearPoint := True;

VB Usage

PowerCad1.SnapToNearPoint = True

See Also

Snapping, OnSnapToFigure


ToolData

ToolData Property :: Public

Use this readonly ToolData property to know which drawing tool data is atteched to the current ToolIdx.

Delphi syntax:

Property ToolData: Pointer;

VB syntax:

Property ToolData As Long

Description

Use this readonly ToolInfo property to know which drawing tool information is atteched to the current ToolIdx. Setting the tool need a little bir more information so, it can be done by the method SetTool.

Delphi Usage

if Powercad1.ToolData <> nil then beep;

VB Usage

If Powercad1.ToolData <> 0 Then beep


ToolIdx

ToolIdx Property :: Public

Use this readonly ToolIdx property to know which drawing tool is active in Powercad.

Delphi syntax:

Property ToolIdx: TPCTool;

VB syntax:

Property ToolIdx As TPCTool

Description

Use ToolIdx property to get the active tool in Powercad. This property is ReadOnly so you can not change the active tool of Powercad using this property. Setting the tool need a little bir more information so, it can be done by the method SetTool.

Delphi Usage

if Powercad1.ToolIdx = toSelect then beep;

VB Usage

If Powercad1.ToolIdx = toSelect Then beep


ToolInfo

ToolInfo Property :: Public

Use this readonly ToolInfo property to know which drawing tool information is atteched to the current ToolIdx.

Delphi syntax:

Property ToolInfo: String;

VB syntax:

Property ToolInfo As String

Description

Use this readonly ToolInfo property to know which drawing tool information is atteched to the current ToolIdx. Setting the tool need a little bir more information so, it can be done by the method SetTool.

Delphi Usage

if Powercad1.ToolInfo = 'TLine' then beep;

VB Usage

If Powercad1.ToolInfo = "TLine" Then beep


UndoCount

UndoCount Property ::: Published

Use the property to define the number of the undo steps that will be recorded in the memory.

Delphi syntax:

Property UndoCount: Integer;

VB syntax:

Property UndoCount As Long

Description

Powercad has undo/redo feature to go back previous drawing states. To be able to do this, Powercad records all actions handled on the canvas by the user. This property defines the number of the previously handled actions that Powercad will record.This property works with the RecordUndo property. If RecordUndo is set to False, this property has no effect on the case. The UndoCount defines a limit for undo recording, however if you dont want to limit the undo recording, then set the UndoCount as 0. This will not limit the undo recording count, however this is not suggested since it can cause memory overloads.

When the Undo Record list exceeds the UndoCount limit, the first record in the list is removed, so always the most recent records are kept in the list. The undo list is cleared when the ClearUndoList method is alled or whenthe drawing is saved. So after any save of the drawing no actions before this save can be undone.

Delphi Usage

Powercad1.UndoCount := 24;

VB Usage

PowerCad1.UndoCount = 24

See Also

Undo Feature, RecordUndo, ClearUndoList, Undo, Redo


Updated

Updated Property :: Public

This property is used internally by Powercad to define if a save operation is need or not bacause of the drawing change.

Delphi syntax:

Property Updated: Boolean;

VB syntax:

Property Updated As Bool

Description

When any chnage is done on Powercad figures or properties, the Updated property is set as True, so that Powercad asks for a save when ExitApplication is called on your FormClose event. You can also set this property to bypass save confirmation or to force it to raise save confirmation in exitapplication.

Delphi Usage

if Powercad1.Updated then DoSave;

VB Usage

If Powercad1.Updated Then DoSave


VerticalZero

VerticalZero Property ::: Published

Use the property to define the origin point and direction of the y axis of the coordinate system.

Delphi syntax:

Property VerticalZero: TVertZero;

VB syntax:

Property VerticalZero As TVertZero

Description

Powercad Coordinate system is metric and the origin is positioned in one of the corner of the page (not middle). The increment direction of the coordinate system is from the origin corner to the opposite corner. Ex: If the origin is top left corner, the positive x is to right and the positive y is to bottom. VerticalZero defines where the y position of the origin is. It can be top or bottom. For the description of the VerticalZero options see TVertZero type definitions.

Delphi Usage

Powercad1.VerticalZero := vzTop;

VB Usage

PowerCad1.VerticalZero = vzTop

See Also

RulerVisible,RulerMode,RulerSystem,Coordinate System,HorizontalZero,TVertZero


WmfPrinting

Use the property to enable or disable the WmfPrinting.

Delphi syntax:

Property WmfPrinting: Boolean;

VB syntax:

Property WmfPrinting As Bool

Description

Powercad prints a drawing either using the printer canvas or sending the complete drawing as a windows metafile. Wmfprinting brings some facilities especially with plotters. To activate the feature set the property to True. By default WmfPrinting is disabled. To understand more about WmfPrinting feature see Printing topic.

Delphi Usage

Powercad1.WmfPrinting := True;

VB Usage

PowerCad1.WmfPrinting = True

See Also

Printing


WorkHeight

WorkHeight Property ::: Published

Use the property to define the height of the work area (Page) in millimeters.

Delphi syntax:

Property WorkHeight: Extended;

VB syntax:

Property WorkHeight As Double

Description

The page is the drawing area of Powercad. To define the height of the page use this WorkHeight property. Note that the unit is mm. To define the width of the page you should use the WorkWidth property. Also setting the PageLayout property will automaticall set the WorkHeight and WorkWidth values with standart page dimensions.

Please note that, the page borders only gives you a preview of the print result. You can still draw and move the objects outside the page, however only the page content is printed.

Delphi Usage

Powercad1.WorkHeight := 217;

VB Usage

PowerCad1.WorkHeight = 217

See Also

WorkWidth, PageLayout, PageOrient, PageColor, Page Concept, Printing


WorkWidth

WorkWidth Property ::: Published

Use the property to define the width of the work area (Page) in millimeters.

Delphi syntax:

Property WorkWidth: Extended;

VB syntax:

Property WorkWidth As Double

Description

The page is the drawing area of Powercad. To define the height of the page use this WorkWidth property. Note that the unit is mm. To define the height of the page you should use the WorkHeight property. Also setting the PageLayout property will automaticall set the WorkHeight and WorkWidth values with standart page dimensions.

Please note that, the page borders only gives you a preview of the print result. You can still draw and move the objects outside the page, however only the page content is printed.

Delphi Usage

Powercad1.WorkWidth := 180;

VB Usage

PowerCad1.WorkWidth = 180

See Also

WorkHeight, PageLayout, PageOrient, PageColor, Page Concept, Printing


ZoomRect

ZoomRect Property ::: Published

Use the property to enable or disable the zoom operation on select rectangle drawing.

Delphi syntax:

Property ZoomRect: Boolean;

VB syntax:

Property ZoomRect As Bool

Description

When the current tool in Powercad is Select Tool, if the user draws a shadow rectangle by mousedown,move and mouseup actions, Powercad selects the figures that is in the boundries of this shaow rectangle. However if this ZoomRect property is set to True, Powercad doesnt make selection in this case, it zooms to the area that the shadow rectangle bounds.

Normally the zoom feature can be accessed by activating the Zoom Area tool, however in some cases that Powercad is used for just a review reason, this property is usefull to provide user to make areal zooms without passing the ZoomArea tool. Because in review functionalities mostly selection features are disabled.

Delphi Usage

Powercad1.ZoomRect := True;

VB Usage

PowerCad1.ZoomRect = True

See Also

Zoom in Powercad, ZoomArea, Using Powercad As Viewer


ZoomScale

ZoomScale Property ::: Published

ZoomScale property is used to define the viewing scale of the drawing on the screen.

Delphi syntax:

Property ZoomScale: Integer;

VB syntax:

Property ZoomScale As Long

Description

Use ZoomScale property to set the zoom ratio of the drawing on the screen. when the property value is 100, the drawing is drawen in its actual size, when the ZoomScale property value is 50 the drawing is drawen in half size. The zoom methods such as ZoomIn or ZoomOut also sets the zoomscale property to zoom the drawing.

Delphi Usage

Powercad1.ZoomScale := 50;

VB Usage

Powercad1.ZoomScale = 50

See Also

Zoom In Powercad, ZoomIn, ZoomOut, ActualSize, ZoomArea, FitToWindow


Methods

Enter topic text here.


ActualSize

ActualSize Method ::: Public

Sets the ZoomScale to 100; the actual view of the drawing.

Delphi syntax:

Procedure ActualSize;

VB syntax:

Public Sub ActualSize()

Description

Use ActiveSize method to set the ZoomScale to 100. In this case the drawing will be viewed in its actual dimensions. Note tha an actual size of a drawing on the screen is just a assumption and never means that the screen dimensions is same as the real print dimensions. It is just a view level which user can have an idea how much will it be when it is about its print size. In the ActualSize level, the number of pixels used to draw 1 mm is equal to DotsPerMilOrig property. By default this property is 4, so if you want to calibrate the screen actual size view according to your monitor size, you can increase or decrease this property. But note that, the value (4) of this property is the best fit for most of the screens.

Delphi Usage

Powercad1.ActiveSize;
// it is same as
// Powercad1.ZoomScale := 100;

VB Usage

PowerCad1.ActiveSize
'it is same as
'PowerCad1.ZoomScale = 100

See Also

ZoomScale, Zoom In Powercad, DotsPerMilOrig


AddCustomFigure

AddCustomFigure Method ::: Public

Adds the figures that are created by code-way, to the Figures List.

Delphi syntax:

Function AddCustomFigure(LayerNbr:Integer;CustomFig: TFigure;Selected:Boolean):TFigHandle;

VB syntax:

Not available in OCX/VB version.

Description

Use AddCustomFigure method to any figure that is created manually by code-way to the Figures list of Powercad. You can create your own figures using the figure classes and then add then to the figure database of Powercad. The LayerNbr parameter defines the destination Layer, CustomFig is the figure to be added, and Selected property defines wheather the figure will be added as selected or not The return parameter is the handle of the figure which is the equal to the Longint form of the pointer of the figure object.

Note that, if you add the figure to the list using this method, the owner and layerhandle properties of the figure will be set automatically by this method.

Delphi Usage

var
  Line: TLine;
  MyHandle: TFigHandle;
begin
  MyLine := TLine.Create(x1,y1,x2,y2,1,ord(psSolid),clBlack,0,0,dsNormal,Powercad1);
  myHandle := Powercad1.AddCustomFigure(0,MyLine,False);
end;

See Also

Figure Classes, Figure Handling


AlignPageDown

AlignPageDown Method ::: Public

Moves all the page content as to be aligned to the bottom.

Delphi syntax:

Procedure AlignPageDown;

VB syntax:

Public Sub AlignPageDown()

Description

Use AlignPageDown method, to move all the figures as to be aligned to the bottom of the page. This means that , the drawing bound rectangle is snapped to the bottom of the page, so all the figures are moved by the distance of the bound rect bottom and page bottom.

Delphi Usage

Powercad1.AlignPageDown;

VB Usage

PowerCad1.AlignPageDown

See Also

AlignPageUp, CenterPage


AlignPageUp

AlignPageUp Method ::: Public

Moves all the page content as to be aligned to the top.

Delphi syntax:

Procedure AlignPageTop;

VB syntax:

Public Sub AlignPageTop()

Description

Use AlignPageTop method, to move all the figures as to be aligned to the bottom of the page. This means that , the drawing bound rectangle is snapped to the top of the page, so all the figures are moved by the distance of the bound rect top and page top.

Delphi Usage

Powercad1.AlignPageUp;

VB Usage

PowerCad1.AlignPageUp

See Also

AlignPageDown, CenterPage


AlignSelection

AlignSelection Method ::: Public

Aligns the selected figures as to be lined equally by a specific side vertically and horizontally.

Delphi syntax:

Procedure AlignSelection(HorzAlign: THorzAligns; VertAlign: TVertAligns);

VB syntax:

Public Sub AlignSelection(ByVal HorzAlign As THorzAligns, ByVal VertAlign As TVertAligns)

Description

Use AlignSelection method, to line figures as to be snapped by a specific side of them. With this method figures can be aligned, so that can be snapped to an imaginary line, or figures can be distrubuted equally by their centers. Aligning may be on horizontal and vertical direction, so each align mode should be provided by the parameters HorzAlign and VertAlign.

Delphi Usage

Powercad1.AlignSelection(haNoChange,vaRight);

VB Usage

PowerCad1.AlignSelection haNoChange,vaRight

See Also

Aligning Figures


Arc

Arc Method ::: Public

Member of Figure Creating Methods

Creates a circular arc figure with the given parameters and adds it to the Powercad Figures list.

Delphi syntax:

Function Arc(LayerNbr:Integer; cx,cy,radius,a1,a2:Double; w,s,c,brs,brc,ArcStyle:Integer;selected:Boolean):TFigHandle;

VB syntax:

Public Function Arc(ByVal LayerNbr As Long, ByVal cx As Double, ByVal cy As Double, ByVal radius As Double, ByVal a1 As Double, ByVal a2 As Double, ByVal w As Long, ByVal s As Long, ByVal c As Long, ByVal brs As Long, ByVal brc As Long, ByVal ArcStyle As Long, ByVal Selected As Boolean) As Long

Description

Use Arc to create a circular arc figure. When this method is called, the created figure is added to the Powercad Figures list automatically. The return parameter is an handle for the figure which can further be used for any type of the figure handling. The LayerNbr parameter defines the layer that the figure will be visible in. cx and cy parameters define the center coordinates of the arc. The radius parameter is the radius value of the circle that the arc is settled on. a1 and a2 parameters defines the start and fnish angles of the arc in radians. For the parameters w,s,c,brs,brc see the appearance parameters. The ArcStyle parameter defines the style of the arc. The selected parameter defines wheather the figure will be selected after it is added or not.

The ArcStyle parameter is designed as integer (not TArcStyle) for technical reasons. So when passing the arc style parameter of the arc please send it as integer. An arc style value can be casted to integer with ord function in delphi [ like ord(asPie) ]. In VB the arc style values are already as Long constant, so you can use the constant enum names directly [like asPie] as in the example below.

Delphi Usage

aHandle := Powercad1.Arc(0,25,25,40,pi/4,pi/2,1,ord(psSolid),clBlack,ord(bsClear),clWhite,ord(asPie),True);

VB Usage

aHandle = Call PowerCad1.Arc(0,25,25,40,pi/4,pi/2,1,psSolid,clBlack,bsClear,clWhite,asPie,True)

See Also

Figure Creation, Figure Handling, Arc Tool


ArrangeArcStyleOfSelection

ArrangeArcStyleOfSelection Method ::: Public

Changes the style of the selected arcs.

Delphi syntax:

Procedure ArrangeArcStyleOfSelection((Value: TArcStyle);

VB syntax:

Public Sub ArrangeArcStyleOfSelection(ByVal Value As TArcStyle)

Description

Use ArrangeArcStyleOfSelection method, to define the arc style of the selected arc or arcs. The arcstyle of an arc can be defined when creating it or after the creation with this method or through the direct figure interface.

This method is only applied to the selected arc or arcs, if you want to set the arcstyle directly using the figure handle you can use the FigureSetArcStyle method.

Delphi Usage

Powercad1.ArrangeArcStyleOfSelection(asChord);

VB Usage

PowerCad1.ArrangeArcStyleOfSelection asChord

See Also

Arc Method, Arc Tool, TArcStyle, FigureSetArcStyle, FigureGetArcStyle


ArrayPolarSelection

ArrayPolarSelection Method ::: Public

Repeat the selected figure(s) as a circular array.

Delphi syntax:

Procedure ArrayPolarSelection(cpoint: TDoublePoint; angle: Double);

VB syntax:

Public Sub ArrayPolarSelection(ByRef cpoint As TDoublePoint, ByVal angle As Double)

Description

Use ArrayPolarSelection method, to repeat (copy) selected figure or figures, arround the given center point with an angle step. The cpoint parameter is the coordinate of the center, the angle parameter defines the step angle of the polar repeat in radians.

If you want to repeat the selected figure(s) in a rectangular form then you should use the ArrayRectSelection method.

Delphi Usage

var cp:TDoublePoint;
begin
  cp := DoublePoint(100,100);
  Powercad1.ArrayPolarSelection(cp,pi/6);
end;

VB Usage

  Dim cp As TDoublePoint
  cp.x := 100;
  cp.y := 100;
  PowerCad1.ArrayPolarSelection cp,pi/6

See Also

Polar Array Tool, ArrayRectSelection


ArrayRectSelection

ArrayRectSelection Method ::: Public

Repeat the selected figure(s) as a rectangular array.

Delphi syntax:

Procedure ArrayRectSelection(distanceX,distanceY: Double;col,row: integer);

VB syntax:

Public Sub ArrayRectSelection(ByVal distanceX As Double, ByVal distanceY As Double, ByVal col As Long, ByVal row As Long)

Description

Use ArrayRectSelection method, to repeat (copy) selected figure or figures, in a rectangular form to right and bottom directions with the given step values and repeat counts. The distanceX and distanceY parameters define the horizontal and vertical step distance of the repeations, and col and row parameters define the horizontal and vertical counts of the repeations.

If you want to repeat the selected figure(s) in a circular form then you should use the ArrayPolarSelection method.

Delphi Usage

Powercad1.ArrayRectSelection(10,10,4,2);

VB Usage

PowerCad1.ArrayRectSelection 10,10,4,2

See Also

Rectangular Array Tool, ArrayPolarSelection


BlockAsMetafile

BlockAsMetafile Method ::: Public

Creates a windows metafile from the given block file and returns the hnadle of it.

Delphi syntax:

Function BlockAsMetafile(bPath: String):Integer;

VB syntax:

Public Function BlockAsMetafile(ByVal bPath As String) As Long

Description

Use this method to get a valid handle of a metafile which is created from a given block. Normally this method is usefull when you need to convert your Powercad blocks to metafile. Note that the returning integer is the handle of the metafile, that you can reference in windows api. The bpath parameter is the physical file address of the block to be converted to metafile.

Note that you can also use the BlockAsWmf method, but this method returns the metafile as a TMetafile class of Delphi. So while BlockAsMetafile is valid for both Delphi and VB, BlockAsWmf is valid only for Delphi.

Delphi Usage

  mHandle := Powercad1.BlockAsMetafile('c:\myblocks\xblok.pwb');

VB Usage

  mHandle = Call PowerCad1.BlockAsMetafile("c:\myblocks\xblok.pwb")

See Also

Using And Making Blocks, BlockAsWmf


BlockAsWmf

BlockAsWmf Method ::: Public

Creates a windows metafile from the given block file and returns the metafile object.

Delphi syntax:

Function BlockAsWmf(bPath: String):TMetafile;

VB syntax:

TMetafile class is Delphi specific, so for this purpose use BlockAsMetafile in VB.

Description

Use this method to get a valid object of a metafile which is created from a given block. Normally this method is usefull when you need to convert your Powercad blocks to metafile. Note that the returning value is TMetafile object which you can handle it in anyway you want in Delphi using its own object interface. The bpath parameter is the physical file address of the block to be converted to metafile.

Note that you can also use the BlockAsMetafile method, but this method returns the metafile as a GDI handle. So while BlockAsMetafile is valid for both Delphi and VB, BlockAsWmf is valid only for Delphi.

Delphi Usage

var
  metafile : TMetafile;
begin
  metafile := Powercad1.BlockAsWmf('c:\myblocks\xblok.pwb');
end;

VB Usage

  Not available in VB/OCX.

See Also

Using And Making Blocks, BlockAsMetafile


BoundLineByText

BoundLineByText Method ::: Public

This method is for use of internal system.
For Line Joining use the methods BoundLinePoint, BoundLineToFigures, BoundSelectedLine


BoundLinePoint

BoundLinePoint Method ::: Public

Bounds a line/polyline end to the figure that is a hit result of the given point coordinate.

Delphi syntax:

Procedure BoundLinePoint(BLine:TFigHandle; seqnbr: integer; bPoint: TDoublePoint);

VB syntax:

Public Sub BoundLinePoint(ByVal BLine As Long, ByVal seqnbr As Long, ByRef bPoint As TDoublePoint)

Description

Use this method to bound a line's or polyline's given end to a figure that is the hit result of the given coordinate. Powercad checks if any figure is hit by the given point bPoint, and bound the end of the line to this figure. The BLine parameter is the line to be bounded, the seqnbr defines which end to be bounded. The seqnbr can be 1 or 2, which 1 means the start tip of the line/polyline and the 2 means the end tip of the line/polyline. If the bPoint hit doesnt give any figure to be bounded then the bounding isnt done.

To see what is bounding or joining see the Joint Lines topic.

Delphi Usage

Powercad1.BoundLinePoint(myLine,DoublePoint(20,45));

VB Usage

Powercad1.BoundLinePoint myLine,DoublePoint(20,45)

See Also

BoundLineToFigures, BoundSelectedLine, UnBoundLine, Joint Lines


BoundLineToFigures

BoundLineToFigures Method ::: Public

Bounds a line/polyline end(s) to the given figures.

Delphi syntax:

Procedure BoundLineToFigures(BLine:TFigHandle; jf1,jf2: TFigHandle);

VB syntax:

Public Sub BoundLineToFigures(ByVal BLine As Long, ByVal jf1 As Long, ByVal jf2 As Long)

Description

Use this method to bound a line's or polyline's ends to the given figures. BLine parameter is the Line or polyline to be bounded, jf1 is the figure that the first end will be bounded to, jf2 is the figure that the second and will be bounded to. If any of the jf1 or jf2 is nill, then only one end will be bounded, if both is nill the method will do no bounding.

To see what is bounding or joining see the Joint Lines topic.

Delphi Usage

Powercad1.BoundLineToFigures(myLine,myrect1,myrect2);

VB Usage

Powercad1.BoundLineToFigures myLine,myrect1,myrect2

See Also

BoundLinePoint, BoundSelectedLine, UnBoundLine, Joint Lines


BoundPLineByText

BoundPLineByText Method ::: Public

This method is for use of internal system.
For Line Joining use the methods BoundLinePoint, BoundLineToFigures, BoundSelectedLine


BoundSelectedLine

BoundSelectedLine Method ::: Public

Bounds the selected line/polyline end(s) to the figures that the ends are on.

Delphi syntax:

Procedure BoundSelectedLine;

VB syntax:

Public Sub BoundSelectedLine

Description

Use this method to bound the selected line's or polyline's ends to the figures that the line ends hit. Powercad makes a hit test for both end of the line/polyline, and bounds the end if any figure is under the hit point.

To see what is bounding or joining see the Joint Lines topic.

Delphi Usage

Powercad1.BoundSelectedLine;

VB Usage

Powercad1.BoundSelectedLine

See Also

BoundLinePoint, BoundLineToFigures, UnBoundLine, Joint Lines


CalibrateLayerScale

CalibrateLayerScale Method ::: Public


CancelActions

CancelActions Method ::: Public


CenterLocation

CenterLocation Method ::: Public


CenterPage

CenterPage ::: Public

Moves all the page content as to be aligned to the center.

Delphi syntax:

Procedure CenterPage;

VB syntax:

Public Sub CenterPage()

Description

Use CenterPage method, to move all the figures as to be aligned to the center of the page horizontally and vertically. This means that , the drawing bound rectangle center is snapped to the center of the page, so all the figures are moved by the distance of the bound rect center and page center.

Delphi Usage

Powercad1.CenterPage;

VB Usage

PowerCad1.CenterPage

See Also

AlignPageDown, AlignPageUp


CExportAs

CExportAs Method ::: Public


CheckByPoint

CheckByPoint ::: Public


CheckByPointInt

CheckByPointInt ::: Public


CheckForGuideDrop

CheckForGuideDrop ::: Public


CheckGuideLine

CheckGuideLine ::: Public


CImportDxf

CImportDxf Method ::: Public


Circle

Circle ::: Public

Member of Figure Creating Methods

Creates a circle figure with the given parameters and adds it to the Powercad Figures list.

Delphi syntax:

Function Circle(LayerNbr: Integer; cx,cy,radius: Double;w,s,c,brs,brc:integer;selected: boolean):TFigHandle;

VB syntax:

Public Function DrawCircle(ByVal LayerNbr As Long, ByVal cx As Double, ByVal cy As Double, ByVal radius As Double, ByVal w As Long, ByVal s As Long, ByVal c As Long, ByVal brs As Long, ByVal brc As Long, ByVal Selected As Boolean) As Long

Description

Use Circle to create a circle figure. When this method is called, the created figure is added to the Powercad Figures list automatically. The return parameter is an handle for the figure which can further be used for any type of the figure handling. The LayerNbr parameter defines the layer that the figure will be visible in. cx and cy parameters define the center coordinates of the circle. The radius parameter is the radius value of the circle. For the parameters w,s,c,brs,brc see the appearance parameters. The selected parameter defines wheather the figure will be selected after it is added or not.

The name of the function in VB version is DrawCircle to prevent it to be confused with Circle method of VB form.

Delphi Usage

aHandle := Powercad1.Circle(0,25,25,40,1,ord(psSolid),clBlack,ord(bsClear),clWhite,True);

VB Usage

aHandle = Call PowerCad1.DrawCircle(0,25,25,40,1,psSolid,clBlack,bsClear,clWhite,True)

See Also

Figure Creation, Figure Handling, Circle Tool


Clear

Clear ::: Public


ClearDimLinesOfSelection

ClearDimLinesOfSelection ::: Public


ClearGuides

ClearGuides ::: Public


ClearUndoList

ClearUndoList Method ::: Public


ClipSelBitmapToSelFigure

ClipSelBitmapToSelFigure ::: Public


CloseSelectedPolyline

CloseSelectedPolyline ::: Public


CNewDrawing

CNewDrawing Method ::: Public

CNewDrawing method is used to start a new drawing through user interface.

Delphi syntax:

Function cNewDrawing:Boolean;

VB syntax:

Property ZoomScale As Long

Description

Use ZoomScale property to set the zoom ratio of the drawing on the screen. when the property value is 100, the drawing is drawen in its actual size, when the ZoomScale property value is 50 the drawing is drawen in half size. The zoom methods such as ZoomIn or ZoomOut also sets the zoomscale property to zoom the drawing.

Delphi Usage

Powercad1.ZoomScale := 50;

VB Usage

Powercad1.ZoomScale = 50

See Also

Zoom In Powercad, ZoomIn, ZoomOut, ActualSize, ZoomArea, FitToWindow


CollectSelectedFigures

CollectSelectedFigures ::: Public


CollectSelectionOrder

CollectSelectionOrder ::: Public


ConvertPLToBezier

ConvertPLToBezier ::: Public


ConvertPLToPolyline

ConvertPLToPolyline ::: Public


ConvertSelectionToBezier

ConvertSelectionToBezier ::: Public


COpenDrawing

COpenDrawing Method ::: Public


COpenDrawingFile

COpenDrawingFile Method ::: Public


CopyToClipBoard

CopyToClipBoard ::: Public


CountBlock

CountBlock ::: Public


CountBlocks

CountBlocks ::: Public


CountBlocksByInfo

CountBlocksByInfo ::: Public


CPrintDrawing

CPrintDrawing Method ::: Public


Create

Create Constructor ::: Public


CreateDimLinesOfSelection

CreateDimLinesOfSelection ::: Public


CreatePreviewBitmap

CreatePreviewBitmap Method ::: Public


CreatePreviewBitmap

CreatePreviewBitmap ::: Public


CSaveAsDrawing

CSaveAsDrawing Method ::: Public


CSaveDrawing

CSaveDrawing Method ::: Public


CTestPrinter

CTestPrinter Method ::: Public


CutToClipBoard

CutToClipBoard ::: Public


DeleteAllUserLayers

DeleteAllUserLayers ::: Public


DeleteLayer

DeleteLayer ::: Public


DeleteLayerWithNbr

DeleteLayerWithNbr ::: Public


DeselectAll

DeselectAll ::: Public


DeSelectFigure

DeSelectFigure ::: Public


Destroy

Destroy Destructor ::: Public


DoFigureModify

DoFigureModify Method ::: Public


DoKeyStroke

DoKeyStroke Method ::: Public


DoMagicWand

DoMagicWand ::: Public


DoPopUp

DoPopUp Method ::: Public


DoResize

DoResize ::: Public


DoSelChange

DoSelChange ::: Public


DoSurfaceClick

DoSurfaceClick ::: Public


DoSurfaceDblClick

DoSurfaceDblClick ::: Public


DoSurfaceDragDrop

DoSurfaceDragDrop ::: Public


DoSurfaceDragEnd

DoSurfaceDragEnd ::: Public


DoSurfaceDragOver

DoSurfaceDragOver ::: Public


DoSurfaceDragStart

DoSurfaceDragStart ::: Public


DoSurfaceLeave

DoSurfaceLeave ::: Public


DoSurfaceMove

DoSurfaceMove ::: Public


DoSurfacePull

DoSurfacePull ::: Public


DoSurfacePush

DoSurfacePush ::: Public


DoSurfaceWheel

DoSurfaceWheel ::: Public


DoSurfaceWheelPull

DoSurfaceWheelPull ::: Public


DoSurfaceWheelPush

DoSurfaceWheelPush ::: Public


DragStarted

DragStarted ::: Public


Draw

Draw ::: Public


DrawCircle

DrawCircle ::: Public

DrawCircle function is added to the interface to replace the name of the Circle function to prevent it to be confused with the Circle method of VB form.

See Circle Function


DrawFigureGuides

DrawFigureGuides ::: Public


DrawFigures

DrawFigures ::: Public


DrawingAsWmf

DrawingAsWmf ::: Public


DrawSelectedFigures

DrawSelectedFigures ::: Public


DrawSelectionPoints

DrawSelectionPoints ::: Public


DrawToCanvas

DrawToCanvas ::: Public


DrawToDC

DrawToDC ::: Public


DrawUserFigureEvent

DrawUserFigureEvent ::: Public


DuplicateSelection

DuplicateSelection ::: Public


DuplicateSelectionAsBezier

DuplicateSelectionAsBezier ::: Public


Ellipse

Ellipse ::: Public

Member of Figure Creating Methods

Creates an ellipse figure with the given parameters and adds it to the Powercad Figures list.

Delphi syntax:

Function Ellipse(LayerNbr:Integer;cx,cy,lenax,lenbx,angle:Double;w,s,c,brs,brc:integer;Selected: Boolean):TFigHandle;

VB syntax:

Public Function Ellipse(ByVal LayerNbr As Long, ByVal cx As Double, ByVal cy As Double, ByVal lenax As Double, ByVal lenbx As Double, ByVal angle As Double, ByVal w As Long, ByVal s As Long, ByVal c As Long, ByVal brs As Long, ByVal brc As Long, ByVal Selected As Boolean) As Long

Description

Use Circle to create an ellipse figure. When this method is called, the created figure is added to the Powercad Figures list automatically. The return parameter is a handle for the figure which can further be used for any type of the figure handling. The LayerNbr parameter defines the layer that the figure will be visible in. cx and cy parameters define the center coordinates of the ellipse. The lena and lenb parameters are the vertical and horizontal radius values of the ellipse. The angle parameter defines the angle of the ellipse. For the parameters w,s,c,brs,brc see the appearance parameters. The selected parameter defines wheather the figure will be selected after it is added or not.

The name of the function in VB version is DrawCircle to prevent it to be confused with Circle method of VB form.

Delphi Usage

aHandle := Powercad1.Ellipse(0,25,25,40,35,pi,1,ord(psSolid),clBlack,ord(bsClear),clWhite,True);

VB Usage

aHandle = Call PowerCad1.Ellipse(0,25,25,40,35,pi,1,psSolid,clBlack,bsClear,clWhite,True)

See Also

Figure Creation, Figure Handling, Ellipse Tool


ElpArc

ElpArc ::: Public

Member of Figure Creating Methods

Creates an elliptical arc figure with the given parameters and adds it to the Powercad Figures list.

Delphi syntax:

Function ElpArc(LayerNbr:Integer; cx,cy,lenax,lenbx,angle,a1,a2:Double; w,s,c,brs,brc,ArcStyle:Integer;selected: boolean):TFigHandle;

VB syntax:

Public Function ElpArc(ByVal LayerNbr As Long, ByVal cx As Double, ByVal cy As Double, ByVal lenax As Double, ByVal lenbx As Double, ByVal angle As Double, ByVal a1 As Double, ByVal a2 As Double, ByVal w As Long, ByVal s As Long, ByVal c As Long, ByVal brs As Long, ByVal brc As Long, ByVal ArcStyle As Long, ByVal Selected As Boolean) As Long

Description

Use ElpArc to create an alliptical arc figure. When this method is called, the created figure is added to the Powercad Figures list automatically. The return parameter is an handle for the figure which can further be used for any type of the figure handling. The LayerNbr parameter defines the layer that the figure will be visible in. cx and cy parameters define the center coordinates of the arc. The lenax,lenbx parameters are the horizontal and vertical radius values of the ellipse that the arc is settled on.The angle parameter defines the angle of the ellipse. a1 and a2 parameters defines the start and fnish angles of the arc in radians. For the parameters w,s,c,brs,brc see the appearance parameters. The ArcStyle parameter defines the style of the arc. The selected parameter defines wheather the figure will be selected after it is added or not.

The ArcStyle parameter is designed as integer (not TArcStyle) for technical reasons. So when passing the arc style parameter of the arc please send it as integer. An arc style value can be casted to integer with ord function in delphi [ like ord(asNormal) ]. In VB the arc style values are already as Long constant, so you can use the constant enum names directly [like asNormal] as in the example below.

Delphi Usage

aHandle := Powercad1.ElpArc(0,25,25,40,35,pi,pi/2,pi/4,1,ord(psSolid),clBlack,ord(bsClear),clWhite,asNormal,True);

VB Usage

aHandle = Call PowerCad1.ElpArc(0,25,25,40,35,pi,pi/2,pi/4,1,psSolid,clBlack,bsClear,clWhite,asNormal,True)

See Also

Figure Creation, Figure Handling, Elliptical Arc Tool


EventEngine

EventEngine ::: Public


ExecuteCustomCommand

ExecuteCustomCommand Method ::: Public


ExecuteTBCommand

ExecuteTBCommand Method ::: Public


ExecuteVerbalCommand

ExecuteVerbalCommand Method ::: Public


ExGrayLayer

ExGrayLayer ::: Public


ExHideLayer

ExHideLayer ::: Public


ExitApplication

ExitApplication Method ::: Public


ExportAsDxf

ExportAsDxf ::: Public


ExportAsWmf

ExportAsWmf ::: Public


FigureAsWmf

FigureAsWmf ::: Public


FigureBlockGetBlockname

FigureBlockGetBlockname ::: Public


FigureConvertPLBezier

FigureConvertPLBezier ::: Public


FigureConvertPLPolyline

FigureConvertPLPolyline ::: Public


FigureDeSelect

FigureDeSelect ::: Public


FigureEdit

FigureEdit ::: Public


FigureFlipHorz

FigureFlipHorz ::: Public


FigureFlipVert

FigureFlipVert ::: Public


FigureGetAngle

FigureGetAngle ::: Public


FigureGetArcFAngle

FigureGetArcFAngle ::: Public


FigureGetArcSAngle

FigureGetArcSAngle ::: Public


FigureGetArcStyle

FigureGetArcStyle ::: Public


FigureGetBrushColor

FigureGetBrushColor ::: Public


FigureGetBrushStyle

FigureGetBrushStyle ::: Public


FigureGetCenter

FigureGetCenter ::: Public


FigureGetClass

FigureGetClass ::: Public


FigureGetClosed

FigureGetClosed ::: Public


FigureGetControlPoint

FigureGetControlPoint ::: Public


FigureGetDCPoint

FigureGetDCPoint ::: Public


FigureGetDiagonal

FigureGetDiagonal ::: Public


FigureGetElpALen

FigureGetElpALen ::: Public


FigureGetElpBLen

FigureGetElpBLen ::: Public


FigureGetFontBold

FigureGetFontBold ::: Public


FigureGetFontCharset

FigureGetFontCharset ::: Public


FigureGetFontColor

FigureGetFontColor ::: Public


FigureGetFontItalic

FigureGetFontItalic ::: Public


FigureGetFontName

FigureGetFontName ::: Public


FigureGetFontSize

FigureGetFontSize ::: Public


FigureGetFontStrike

FigureGetFontStrike ::: Public


FigureGetFontUnderline

FigureGetFontUnderline ::: Public


FigureGetHandle

FigureGetHandle ::: Public


FigureGetInfo

FigureGetInfo ::: Public


FigureGetJoin1

FigureGetJoin1 ::: Public


FigureGetJoin2

FigureGetJoin2 ::: Public


FigureGetLayerHandle

FigureGetLayerHandle ::: Public


FigureGetLockModify

FigureGetLockModify ::: Public


FigureGetLockMove

FigureGetLockMove ::: Public


FigureGetName

FigureGetName ::: Public


FigureGetPenColor

FigureGetPenColor ::: Public


FigureGetPenStyle

FigureGetPenStyle ::: Public


FigureGetPenWidth

FigureGetPenWidth ::: Public


FigureGetPictureName

FigureGetPictureName ::: Public


FigureGetPoint

FigureGetPoint ::: Public


FigureGetPointCount

FigureGetPointCount ::: Public


FigureGetRadius

FigureGetRadius ::: Public


FigureGetRect

FigureGetRect ::: Public


FigureGetRgnHandle

FigureGetRgnHandle ::: Public


FigureGetRichText

FigureGetRichText ::: Public


FigureGetRowStyle

FigureGetRowStyle ::: Public


FigureGetSegmentType

FigureGetSegmentType ::: Public


FigureGetSelected

FigureGetSelected ::: Public


FigureGetText

FigureGetText ::: Public


FigureGetTransparent

FigureGetTransparent ::: Public


FigureGrpGetCombined

FigureGrpGetCombined ::: Public


FigureGrpGetFigureCount

FigureGrpGetFigureCount ::: Public


FigureGrpGetFigureHandle

FigureGrpGetFigureHandle ::: Public


FigureGrpSetCombined

FigureGrpSetCombined ::: Public


FigureGrpUngroup

FigureGrpUngroup ::: Public


FigureInvertArc

FigureInvertArc ::: Public


FigureInvertArcSegment

FigureInvertArcSegment ::: Public


FigureLoadBitmapFromFile

FigureLoadBitmapFromFile ::: Public


FigureMirror

FigureMirror ::: Public


FigureMove

FigureMove ::: Public


FigureRotate

FigureRotate ::: Public


FigureRotateByPoint

FigureRotateByPoint ::: Public


FigureSaveBitmapToFile

FigureSaveBitmapToFile ::: Public


FigureScale

FigureScale ::: Public


FigureScaleByPoint

FigureScaleByPoint ::: Public


FigureSelect

FigureSelect ::: Public


FigureSelectAsRotate

FigureSelectAsRotate ::: Public


FigureSetAngle

FigureSetAngle ::: Public


FigureSetArcAngles

FigureSetArcAngles ::: Public


FigureSetArcStyle

FigureSetArcStyle ::: Public


FigureSetBrushColor

FigureSetBrushColor ::: Public


FigureSetBrushStyle

FigureSetBrushStyle ::: Public


FigureSetClosed

FigureSetClosed ::: Public


FigureSetControlPoints

FigureSetControlPoints ::: Public


FigureSetDiagonal

FigureSetDiagonal ::: Public


FigureSetFontBold

FigureSetFontBold ::: Public


FigureSetFontCharset

FigureSetFontCharset ::: Public


FigureSetFontColor

FigureSetFontColor ::: Public


FigureSetFontItalic

FigureSetFontItalic ::: Public


FigureSetFontName

FigureSetFontName ::: Public


FigureSetFontSize

FigureSetFontSize ::: Public


FigureSetFontStrike

FigureSetFontStrike ::: Public


FigureSetFontUnderline

FigureSetFontUnderline ::: Public


FigureSetInfo

FigureSetInfo ::: Public


FigureSetJoin1

FigureSetJoin1 ::: Public


FigureSetJoin2

FigureSetJoin2 ::: Public


FigureSetLayerHandle

FigureSetLayerHandle ::: Public


FigureSetLockModify

FigureSetLockModify ::: Public


FigureSetLockMove

FigureSetLockMove ::: Public


FigureSetPenColor

FigureSetPenColor ::: Public


FigureSetPenStyle

FigureSetPenStyle ::: Public


FigureSetPenWidth

FigureSetPenWidth ::: Public


FigureSetPoint

FigureSetPoint ::: Public


FigureSetRgnHandle

FigureSetRgnHandle ::: Public


FigureSetRichText

FigureSetRichText ::: Public


FigureSetRowStyle

FigureSetRowStyle ::: Public


FigureSetSegmentType

FigureSetSegmentType ::: Public


FigureSetText

FigureSetText ::: Public


FigureSetTransparent

FigureSetTransparent ::: Public


FigureSkewBitmap

FigureSkewBitmap ::: Public


FigureTestPoint

FigureTestPoint ::: Public


FigureTestRect

FigureTestRect ::: Public


FindEventEngine

FindEventEngine ::: Public


FindFigureByName

FindFigureByName ::: Public


FitToWindow

FitToWindow Method ::: Public


FlipImagesOfSelection

FlipImagesOfSelection ::: Public


GetActiveCanvas

GetActiveCanvas ::: Public


GetBuildNumber

GetBuildNumber ::: Public


GetCustomPropList

GetCustomPropList ::: Public


GetCustomStream

GetCustomStream ::: Public


GetDCLen

GetDCLen ::: Public


GetDCPoint

GetDCPoint ::: Public


GetDrawingBounds

GetDrawingBounds ::: Public


GetDrawingRect

GetDrawingRect ::: Public


GetFigureCustomStream

GetFigureCustomStream ::: Public


GetLayer

GetLayer ::: Public


GetLayerGrayed

GetLayerGrayed ::: Public


GetLayerHandle

GetLayerHandle ::: Public


GetLayerInfo

GetLayerInfo ::: Public


GetLayerName

GetLayerName ::: Public


GetLayerNbr

GetLayerNbr ::: Public


GetLayerVisible

GetLayerVisible ::: Public


GetLineJoins

GetLineJoins ::: Public


GetPageRect

GetPageRect ::: Public


GetSelectedHandle

GetSelectedHandle ::: Public


GetSelectionBounds

GetSelectionBounds ::: Public


GetSelectionHandles

GetSelectionHandles ::: Public


GetSelectionRect

GetSelectionRect ::: Public


GetSlcArcStyle

GetSlcArcStyle ::: Public


GetSlcBrushColor

GetSlcBrushColor ::: Public


GetSlcBrushStyle

GetSlcBrushStyle ::: Public


GetSlcFont

GetSlcFont ::: Public


GetSlcFontBold

GetSlcFontBold ::: Public


GetSlcFontCharset

GetSlcFontCharset ::: Public


GetSlcFontColor

GetSlcFontColor ::: Public


GetSlcFontItalic

GetSlcFontItalic ::: Public


GetSlcFontName

GetSlcFontName ::: Public


GetSlcFontSize

GetSlcFontSize ::: Public


GetSlcFontStrike

GetSlcFontStrike ::: Public


GetSlcFontUnderline

Enter topic text here.


GetSlcImageClipped

GetSlcImageClipped ::: Public


GetSlcImageTransparent

GetSlcImageTransparent ::: Public


GetSlcLineBounded

GetSlcLineBounded ::: Public


GetSlcPenColor

GetSlcPenColor ::: Public


GetSlcPenStyle

GetSlcPenStyle ::: Public


GetSlcPenWidth

GetSlcPenWidth ::: Public


GetSlcPolylineClosed

GetSlcPolylineClosed ::: Public


GetSlcRowStyle

GetSlcRowStyle ::: Public


GetSurfaceBitmap

GetSurfaceBitmap ::: Public


GetSurfaceBitmapHandle

GetSurfaceBitmapHandle ::: Public


GetVersion

GetVersion ::: Public


GetVisibleRect

GetVisibleRect ::: Public


GrayLayer

GrayLayer ::: Public


GroupSelection

GroupSelection ::: Public


HideAllLayers

HideAllLayers ::: Public


HideLayer

HideLayer ::: Public


HitTestModPoint

HitTestModPoint ::: Public


HitTestModPointInt

HitTestModPointInt ::: Public


HitTestModPointIntVal

HitTestModPointIntVal ::: Public


HSCBarPosition

HSCBarPosition ::: Public


ImportDrawing

ImportDrawing ::: Public


ImportDXF

ImportDXF ::: Public


ImportMetafile

ImportMetafile ::: Public


ImportWMF

ImportWMF ::: Public


InsertBitmap

InsertBitmap ::: Public


InsertBitmapHandle

InsertBitmapHandle ::: Public


InsertBlockFromStream

InsertBlockFromStream ::: Public


InsertBlockwithFileName

InsertBlockwithFileName ::: Public


InsertMetafile

InsertMetafile ::: Public


InsertWMF

InsertWMF ::: Public


InterBreakSelection

InterBreakSelection ::: Public


InvertArcsOfSelection

InvertArcsOfSelection ::: Public


InvertSelection

InvertSelection ::: Public


IsBlinking

IsBlinking ::: Public


IsTextSelected

IsTextSelected ::: Public


IsUnNamed

IsUnNamed Method ::: Public


KnifeSelection

KnifeSelection ::: Public


Line

Line ::: Public

Member of Figure Creating Methods

Creates a line figure with the given parameters and adds it to the Powercad Figures list.

Delphi syntax:

Function Line(LayerNbr:Integer;x1,y1,x2,y2:Double;w,s,c:integer; row: integer;selected: boolean):TFigHandle;

VB syntax:

Public Function Line(ByVal LayerNbr As Long, ByVal x1 As Double, ByVal y1 As Double, ByVal x2 As Double, ByVal y2 As Double, ByVal w As Long, ByVal s As Long, ByVal c As Long, ByVal row As Long, ByVal Selected As Boolean) As Long

Description

Use Line to create a line figure. When this method is called, the created figure is added to the Powercad Figures list automatically. The return parameter is an handle for the figure which can further be used for any type of the figure handling. The LayerNbr parameter defines the layer that the figure will be visible in. x1 and y1 parameters define the first point, x2 and y2 parameters define the second point coordinates of the line. For the parameters w,s,c see the appearance parameters. The row parameter defines the end row style of the line. The selected parameter defines wheather the figure will be selected after it is added or not.

The row parameter is designed as integer (not TRowStyle) for technical reasons. So when passing the row style parameter of the line please send it as integer. A row style value can be casted to integer with ord function in delphi [ like ord(rsNone) ]. In VB the row style values are already as Long constant, so you use the constant enum names directly [like rsNone] as in the example below.

Delphi Usage

aHandle := Powercad1.Line(0,25,25,50,65,1,ord(psSolid),clBlack,ord(rsNone),True);

VB Usage

aHandle = Call PowerCad1.Line(0,25,25,50,65,1,psSolid,clBlack,rsNone,True)

See Also

Figure Creation, Figure Handling, Line Tool


LoadFromFile

LoadFromFile ::: Public


LoadFromStream

LoadFromStream ::: Public


LockSelChange

LockSelChange ::: Public


LockSelectionToModify

LockSelectionToModify ::: Public


LockSelectionToMove

LockSelectionToMove ::: Public


MakeSelectedLinesPolyline

MakeSelectedLinesPolyline ::: Public


MakeSelectionBlock

MakeSelectionBlock ::: Public


ManualRefresh

ManualRefresh Method ::: Public


MergeAllLayers

MergeAllLayers ::: Public


MergeVisibleLayers

MergeVisibleLayers ::: Public


MirrorSelection

MirrorSelection ::: Public


ModifyBrushColor

ModifyBrushColor ::: Public


ModifyBrushStyle

ModifyBrushStyle ::: Public


ModifyFontBold

ModifyFontBold ::: Public


ModifyFontCharset

ModifyFontCharset ::: Public


ModifyFontColor

ModifyFontColor ::: Public


ModifyFontItalic

ModifyFontItalic ::: Public


ModifyFontName

ModifyFontName ::: Public


ModifyFontSize

ModifyFontSize ::: Public


ModifyFontStrike

ModifyFontStrike ::: Public


ModifyFontUnderline

ModifyFontUnderline ::: Public


ModifyPenColor

ModifyPenColor ::: Public


ModifyPenStyle

ModifyPenStyle ::: Public


ModifyPenWidth

ModifyPenWidth ::: Public


ModifyRowStyle

ModifyRowStyle ::: Public


MoveAll

MoveAll ::: Public


MoveAllSilent

MoveAllSilent ::: Public


MoveSelection

MoveSelection ::: Public


NameSelection

NameSelection ::: Public


NewLayer

NewLayer ::: Public


NewPattern

NewPattern ::: Public


OffSetSelection

OffSetSelection ::: Public


OpenSelectedPolyline

OpenSelectedPolyline ::: Public


OrderSelection

OrderSelection ::: Public


PasteFromClipBoard

PasteFromClipBoard ::: Public


PointInDetail

PointInDetail ::: Public


PointInHRuler

PointInHRuler ::: Public


PointInHScroll

PointInHScroll ::: Public


PointInUserFigureEvent

PointInUserFigureEvent ::: Public


PointInView

PointInView ::: Public


PointInVRuler

PointInVRuler ::: Public


PointInVScroll

PointInVScroll ::: Public


Polygon

Polygon ::: Public

This method is still reserved for the backwards compability. To draw polygons please use the Polyline method with the closed parameter set to True. The Polygon method parameter structure is the same as the Polyline method interface.


PolyLine

PolyLine ::: Public

Member of Figure Creating Methods

Creates a polyline figure with the given parameters and adds it to the Powercad Figures list.

Delphi syntax:

Function PolyLine(LayerNbr:integer;points:TDoublePointArr; w,s,c: integer; row,brs,brc:integer;closed:boolean;selected: boolean):TFigHandle;overload;

Function PolyLine(LayerNbr:integer;var points:TDoublePoint; pCount,w,s,c: integer; row,brs,brc:integer;closed:boolean;selected: boolean):TFigHandle;overload;

VB syntax:

Public Function PolyLine(ByVal LayerNbr As Long, ByRef points As TDoublePoint, ByVal pCount As Long, ByVal w As Long, ByVal s As Long, ByVal c As Long, ByVal row As Long, ByVal brs As Long, ByVal brc As Long, ByVal closed As Boolean, ByVal Selected As Boolean) As Long
Description

A Polyline in Powercad is an improved complex figure to draw simple polylines, curves and polygons.

Use PolyLine to create a polyline figure. When this method is called, the created figure is added to the Powercad Figures list automatically. The return parameter is an handle for the figure which can further be used for any type of the figure handling. The LayerNbr parameter defines the layer that the figure will be visible in. Points parameter is the array that stores the points of the polyline. For the parameters w,s,c,brs,brc see the appearance parameters. The row parameter defines the end row style of the line. The closed parameter defines wheather the polyline is closed or not. If the polyline is closed an automtic line (or curve) segment is drawen from the last point to the first one. The selected parameter defines wheather the figure will be selected after it is added or not.

The row parameter is designed as integer (not TRowStyle) for technical reasons. So when passing the row style parameter of the polyline please send it as integer. A row style value can be casted to integer with ord function in delphi [ like ord(rsNone) ]. In VB the row style values are already as Long constant, so you use the constant enum names directly [like rsNone] as in the example below. The rows are only used for the first and last line segment of polyline.

Note that, the second overload of the function, is a little bit different for the passing of the point array. To make it safer in VB usage, the second function prototype only takes the first point of the array and the pointcount, so it iterates the other points in the array using pointer arithmatic. Only the second prototype is used in OCX structure.

There is no need for a Polygon method in the interface, since it is also created with Polyline method, but it is reserved for backwards compability.

If you want to create a curved polyline (bezier segments) then you should first create the polyline and the curve it using polyline figure functions.

Delphi Usage

var
  Points: TDoublePointArr;
begin
  SetLength(Points,4);
  Points[0] := DoublePoint(25,10);
  Points[1] := DoublePoint(25,20);
  Points[2] := DoublePoint(35,20);
  Points[3] := DoublePoint(45,30);
  aHandle := Powercad1.PolyLine(0,Points,1,ord(psSolid),clBlack,ord(rsNone),ord(bsClear),clWhite,True,True);
  // or try this : second overload
  //aHandle := Powercad1.PolyLine(0,Points[0],4,1,ord(psSolid),clBlack,ord(rsNone),ord(bsClear),clWhite,True,True);
end;

VB Usage

  Dim Points(4) As TDoublePoint
  Points(0).x = 25 : Points(0).y = 10
  Points(1).x = 25 : Points(1).y = 20
  Points(2).x = 35 : Points(2).y = 20
  Points(3).x = 45 : Points(3).y = 30
  aHandle := Powercad1.PolyLine(0,Points[0],4,1,ord(psSolid),clBlack,ord(rsNone),ord(bsClear),clWhite,True,True);

See Also

Figure Creation, Figure Handling, Polyline Tool, Polygon


PrintByTiling

PrintByTiling Method ::: Public


PrintDrawing

PrintDrawing Method ::: Public


PrintMessage

PrintMessage Method ::: Public


PrintPreview

PrintPreview ::: Public


PrnAbortJob

PrnAbortJob ::: Public


PrnDoJob

PrnDoJob ::: Public


PrnEndJob

PrnEndJob ::: Public


PrnStartJob

PrnStartJob ::: Public


RecordModifyUndo

RecordModifyUndo ::: Public


Rectangle

Rectangle ::: Public

Member of Figure Creating Methods

Creates a rectangle figure with the given parameters and adds it to the Powercad Figures list.

Delphi syntax:

Function Rectangle(LayerNbr:Integer; x1,y1,x2,y2: Double; w,s,c,brs,brc:integer;selected: boolean):TFigHandle;

VB syntax:

Public Function Rectangle(ByVal LayerNbr As Long, ByVal x1 As Double, ByVal y1 As Double, ByVal x2 As Double, ByVal y2 As Double, ByVal w As Long, ByVal s As Long, ByVal c As Long, ByVal brs As Long, ByVal brc As Long, ByVal Selected As Boolean) As Long

Description

Use Rectangle method to create a rectangle figure. When this method is called, the created figure is added to the Powercad Figures list automatically. The return parameter is an handle for the figure which can further be used for any type of the figure handling. The LayerNbr parameter defines the layer that the figure will be visible in. x1 and y1 parameters define the first corner, and x2 and y2 define the other corner of the rectangle. For the parameters w,s,c,brs,brc see the appearance parameters. The selected parameter defines wheather the figure will be selected after it is added or not.

Delphi Usage

aHandle := Powercad1.Rectangle(0,25,25,40,35,1,ord(psSolid),clBlack,ord(bsClear),clWhite,True);

VB Usage

aHandle = Call PowerCad1.Rectangle(0,25,25,40,35,1,psSolid,clBlack,bsClear,clWhite,True)

See Also

Figure Creation, Figure Handling, Rectangle Tool


Redo

Redo Method ::: Public


ReDrawSelection

ReDrawSelection ::: Public


ReDrawSelectionPoints

ReDrawSelectionPoints ::: Public


Refresh

Refresh Method ::: Public


RefreshSelection

RefreshSelection ::: Public


RegisterEvent

RegisterEvent ::: Public


RegisterFigureClass

RegisterFigureClass ::: Public


RegisterModPoint

RegisterModPoint ::: Public


ReLocate

ReLocate ::: Public


RemoveSelection

RemoveSelection ::: Public


Reselect

Reselect ::: Public


ResetActions

ResetActions Method ::: Public


RestoreScroll

RestoreScroll ::: Public


ResumeBlink

ResumeBlink ::: Public


RotateSelection

RotateSelection ::: Public


RotateSelectionCenter

RotateSelectionCenter ::: Public


SaveAsBitmap

SaveAsBitmap ::: Public


SaveScroll

SaveScroll ::: Public


SaveToFile

SaveToFile ::: Public


SaveToStream

SaveToStream ::: Public


ScaleDrawing

ScaleDrawing ::: Public


ScaleSelection

ScaleSelection ::: Public


SelectAll

SelectAll ::: Public


SelectByFigure

SelectByFigure ::: Public


SelectByPoint

SelectByPoint ::: Public


SelectFigure

SelectFigure ::: Public


SelectionAsBitmap

SelectionAsBitmap ::: Public


SelectionAsMetaFile

SelectionAsMetaFile ::: Public


SelectionAsWmf

SelectionAsWmf ::: Public


SelectWithInArea

SelectWithInArea ::: Public


SetBlockInfo

SetBlockInfo ::: Public


SetCursor

SetCursor ::: Public


SetCustomStream

SetCustomStream ::: Public


SetCustomSurface

SetCustomSurface ::: Public


SetDragCursor

SetDragCursor ::: Public


SetFieldText

SetFieldText ::: Public


SetFigureCustomStream

SetFigureCustomStream ::: Public


SetHScrollDelta

SetHScrollDelta ::: Public


SetHScrollPosition

SetHScrollPosition ::: Public


SetScrollPositions

SetScrollPositions ::: Public


SetSurfaceMargin

SetSurfaceMargin ::: Public


SetTool

SetTool Method ::: Public


SetTransparentOfSelection

SetTransparentOfSelection ::: Public


SetVScrollDelta

SetVScrollDelta ::: Public


SetVScrollPosition

SetVScrollPosition ::: Public


ShowAllLayers

ShowAllLayers ::: Public


ShowLayer

ShowLayer ::: Public


SimplfySelectedPolyline

SimplfySelectedPolyline ::: Public


SimulateDown

SimulateDown ::: Public


SimulateRightClick

SimulateRightClick ::: Public


SimulateTrace

SimulateTrace ::: Public


SimulateUp

SimulateUp ::: Public


StartBlink

StartBlink ::: Public


StopBlink

StopBlink ::: Public


StretchToDC

StretchToDC ::: Public


SurfaceHeight

SurfaceHeight ::: Public


SurfaceWidth

SurfaceWidth ::: Public


TextOut

TextOut ::: Public

Member of Figure Creating Methods

Creates a text figure with the given parameters and adds it to the Powercad Figures list.

Delphi syntax:

Function TextOut(LayerNbr:Integer; x1,y1,angle,height,ratio: double;
                 atext,aFontName: string;FontCharset:Byte;Color: Integer;
                 Selected: Boolean):TFigHandle;

VB syntax:

Public Function TextOut(ByVal LayerNbr As Long, ByVal x1 As Double, ByVal y1 As Double, ByVal angle As Double, ByVal height As Double, ByVal ratio As Double, ByVal atext As String, ByVal aFontName As String, ByVal FontCharset As Byte, ByVal Color As Long, ByVal Selected As Boolean) As Long

Description

Use TextOut method to create a single line text figure. When this method is called, the created figure is added to the Powercad Figures list automatically. The return parameter is an handle for the figure which can further be used for any type of the figure handling. The LayerNbr parameter defines the layer that the figure will be visible in. x1 and y1 parameters define the left top corner of the text to be placed. The angle parameter defines the angle of the text in radians. The height parameter defines the height of the text character in mm, the ratio parameter defines the ratio of the character width to height. If you want the ratio arranged automatically by font's geometry then send it as 0. The atext parameter is the text to be displayed.The aFontName parameter is the name of the font that the text will applied to the text. The fontcharset parameter defines the character set of the font, if you want to use the default (English Latin) character set, send it as 0. For other character sets see the list of the applied character sets in Powercad. The color parameter defines the font color of the text. The selected parameter defines whether the figure will be selected after it is added or not.

If you want to create a multi formatted and multi lined text you can use the RichText feature.

If you want to create a simple but multi lined text you can use the TextPanel feature.

Delphi Usage

aHandle := Powercad1.TextOut(0,25,25,0,3.5,0,'Hello World','Arial',0,clBlack,True);

VB Usage

aHandle = Call PowerCad1.TextOut(0,25,25,0,3.5,0,"Hello World","Arial",0,clBlack,True);

See Also

Figure Creation, Figure Handling, Text Tool, TextPanel Tool, RichText Tool, Character Sets


UnBoundLine

UnBoundLine ::: Public


UnClipSelBitmap

UnClipSelBitmap ::: Public


Undo

Undo Method ::: Public


UngroupSelection

UngroupSelection ::: Public


UnLockSelChange

UnLockSelChange ::: Public


UnRegisterEvent

UnRegisterEvent ::: Public


UnRegisterModPoint

UnRegisterModPoint ::: Public


Vertex

Vertex ::: Public

Member of Figure Creating Methods

Creates a vertex (point) figure with the given parameters and adds it to the Powercad Figures list.

Delphi syntax:

Function Vertex(LayerNbr:Integer;x,y:Double;Selected: Boolean):TFigHandle;

VB syntax:

Public Function Vertex(ByVal LayerNbr As Long, ByVal x As Double, ByVal y As Double, ByVal Selected As Boolean) As Long

Description

Use Vertex method to create a vertex (point) figure. When this method is called, the created figure is added to the Powercad Figures list automatically. The return parameter is an handle for the figure which can further be used for any type of the figure handling. The LayerNbr parameter defines the layer that the figure will be visible in. x and y parameters define the coordinates of the point. The selected parameter defines whether the figure will be selected after it is added or not.

Delphi Usage

aHandle := Powercad1.Vertex(0,25,25,True);

VB Usage

aHandle = Call PowerCad1.DrawCircle(0,25,25,True)

See Also

Figure Creation, Figure Handling, Vertex Tool


View3D

View3D ::: Public


VSCBarPosition

VSCBarPosition ::: Public


WeldIntoPolyline

WeldIntoPolyline ::: Public


ZoomArea

ZoomArea Method ::: Public


ZoomIn

ZoomIn Method ::: Public


ZoomOut

ZoomOut Method ::: Public


OnFileNameChange

Enter topic text here.


OnSnapToFigure

Enter topic text here.


OnPopMenuClicked

Enter topic text here.


OnCustomGuideTrace

Enter topic text here.


TPopStyle

Delphi Syntax

TPopStyle = (psStandart,psNone);

VB Syntax

Public Enum TPopStyle
  psStandart
  psNone
End Enum

See the PopStyle property for the usage of the type.


TPCTool

Delphi Syntax

TPCTool = (toSelect,toZoom,toInsertBlock,toInsertCurrentBlock,toFigure,toOperation,
toInsertUserPicture,toDetailZoom,toLocate,toDelete);

VB Syntax

Public Enum TPCTool
  toSelect
  toZoom
  toInsertBlock
  toInsertCurrentBlock
  toFigure
  toOperation
  toInsertUserPicture
  toDetailZoom
  toLocate
  toDelete
End Enum

See the SetTool method for the usage of the type.


TRowStyle

Delphi Syntax

TRowStyle = ( rsNone,rsRightSolid,rsLeftSolid, rsBothSolid,
              rsRightLight,rsLeftLight,rsBothLight );

VB Syntax

Public Enum TRowStyle
  rsNone
  rsRightSolid
  rsLeftSolid
  rsBothSolid
  rsRightLight
  rsLeftLight
  rsBothLight
End Enum


TArcStyle

Delphi Syntax

TArcStyle = (asOpen,asPie,asChord);

VB Syntax

Public Enum TArcStyle
  asOpen
  asPie
  asChord
End Enum

Description

asOpen | Defines that the arc is open. No closed region to paint.
asPie | Defines that the arc is pie; two lines are drawen from the arc ends to the center. Arc is a closed region to paint so brush settings are applied.
asChord | Defines that the arc is chord; one line is drawen from one arc end to the other. Arc is a closed region to paint so brush settings are applied.


TMapRescale

Delphi Syntax

TMapRescale = (rsNever,rsAlways,rsAskUser);

VB Syntax

Public Enum TMapRescale
  rsNever
  rsAlways
  rsAskUser
End Enum

Description

rsNever | No scale is done when the mapscale is changed.
asPie | Powercad rescales the drawing when the mapscale is changed.
asChord | Powercad asks the user to rescale the drawing when the mapscale is changed.
See Also

RescaleToMap


TRulerMode

Delphi Syntax

TRulerMode = (rmPage,rmWorld);

VB Syntax

Public Enum TRulerMode
  rmPage
  rmWorld
End Enum

Description

rmPage | The ruler shows the measures on the paper.
rmWorld | The ruler shows the measures on the real world.
See Also

RulerMode Property


TGridType

Delphi Syntax

TGridType = (grtLine,grtPoint,grtCross);

VB Syntax

Public Enum TGridType
  grtLine
  grtPoint
  grtCross
End Enum

Description

grtLine | The grids are drawen as lines.
grtPoint | Only the grids intersection points are drawen.
grtCross | Small crosses are drawen in the intersection points of the grids.
See Also

GridType Property


TPageLayout

Delphi Syntax

TPageLayout = ( plA0,plA1,plA2,plA3,plA4,plA5,plA6,plB4,plB5,plTabloid,
                plLetter,plCustom );

VB Syntax

Public Enum TPageLayout
  plA0
  plA1
  plA2
  plA3
  plA4
  plA5
  plA6
  plB4
  plB5
  plTabloid
  plLetter
  plCustom
End Enum

Description

plA0
Sets the page dimensions as A0 paper. WorkHeight = 1189 mm WorkWidth = 841 mm
plA1
Sets the page dimensions as A1 paper. WorkHeight = 841 mm WorkWidth = 594 mm
plA2
Sets the page dimensions as A2 paper. WorkHeight = 594 mm WorkWidth = 421 mm
plA3
Sets the page dimensions as A3 paper. WorkHeight = 421 mm WorkWidth = 297 mm
plA4
Sets the page dimensions as A4 paper. WorkHeight = 297 mm WorkWidth = 210 mm
plA5
Sets the page dimensions as A5 paper. WorkHeight = 210 mm WorkWidth = 148 mm
plA6
Sets the page dimensions as A6 paper. WorkHeight = 148 mm WorkWidth = 105 mm
plB4
Sets the page dimensions as B4 paper. WorkHeight = 353 mm WorkWidth = 250 mm
plB5
Sets the page dimensions as B5 paper. WorkHeight = 2500 mm WorkWidth = 176 mm
plTabloid
Sets the page dimensions as Tabloid paper. WorkHeight = 431 mm WorkWidth = 279 mm
plLetter
Sets the page dimensions as Letter paper. WorkHeight = 279 mm WorkWidth = 215 mm
plCustom
For none standart page values this option is used. When WorkHeight or WorkWidth are set manually the page layout is automatically set to plCustom.

See Also

PageLayout Property


TPageOrient

Delphi Syntax

TPageOrient = (poLandscape,poPortrait);

VB Syntax

Public Enum TPageOrient
  poLandscape
  poPortrait
End Enum

Description

poLandscape | The page is positioned as to be horizontal. Workwidth is bigger then workheight.
poPortrait | The page is positioned as to be vertical. Workheight is bigger then workwidth.
See Also

PageOrient Property


TGuideTraces

Delphi Syntax

TGuideTraces  = (gtNone,gtNinty,gtThirty,gtFortyFive,gtSixty,gtCustom);

VB Syntax

Public Enum TGuideTraces
  gtNone
  gtNinty
  gtThirty
  gtFortyFive
  gtSixty
  gtCustom
End Enum

Description

gtNone
The GuideTrace Lines are not visible.
gtNinty
The GuideTrace Lines are drawen as to have 90° between each other.
gtThirty
The GuideTrace Lines are drawen as to have 30° between each other.
gtFortyFive
The GuideTrace Lines are drawen as to have 45° between each other.
gtSixty
The GuideTrace Lines are drawen as to have 60° between each other.
gtCustom
The Guide Trace Lines are drawen by code in the OnCustomGuideTrace event.

See Also

GuideTrace Property


TRulerSystem

Delphi Syntax

TRulerSystem = (rsMetric, rsWhitworth);

VB Syntax

Public Enum TRulerSystem
  rsMetric
  rsWhitworth
End Enum

Description

rsMetric | The rulers and the dimension tools are drawen in metric units.
rsWhitworth | The rulers and the dimension tools are drawen in inch units.
See Also

RulerSystem Property


TVertZero

Delphi Syntax

TVertZero = (vzBottom,vzTop);

VB Syntax

Public Enum TVertZero
  vzBottom
  vzTop
End Enum

Description

vzTop | The coordinate system origin y pos is top of the page. The positive y is to the bottom of the page.
vzBottom | The coordinate system origin y pos is bottom of the page. The positive y is to the top of the page.
See Also

VerticalZero Property


THorzZero

Delphi Syntax

THorzZero = (vzLeft,vzRight);

VB Syntax

Public Enum THorzZero
  vzLeft
  vzRight
End Enum

Description

vzLeft | The coordinate system origin x pos is left of the page. The positive x is to the right of the page.
vzRight | The coordinate system origin x pos is right of the page. The positive x is to the right of the page.
See Also

HorizontalZero Property


TFigure

Enter topic text here.


TFigHandle

Delphi Syntax

TFigHandle = LongInt;

VB Syntax

Not Available in OCX/VB version

Description

This type is Longint type used for the handles of the Powercad figures. TFigHandle type doesnt add anything extra to the LongInt type, but only shows that the variable of the type is used for a handle to any Powercad figure. In VB type Long is used directly for figure handles.


THorzAligns

Enter topic text here.


TVertAligns

Enter topic text here.


TDoublePointArr

Enter topic text here.


TDoublePoint

Enter topic text here.


Character Sets

Enter topic text here.


Comman Styles

Enter topic text here.


Appearance Parameters

Enter topic text here.


Extending PowerCad

Enter topic text here.


Figure Classes

Enter topic text here.


Additional Subjects

Enter topic text here.


Using Powercad As Viewer

Enter topic text here.


Articles

If you want to document your special experinece with Powercad or to write down how a specific job is done by Powercad please send us an article and we will publish it here.

Send your articles to support@tekhnelogos.com