NewPoint
Creates a new digitizer point at the X, Y coordinates.
Syntax:
Procedure
: IPlanswift
.
NewPoint(X, Y:
Double
);
Code Reference:
- 1. Create a New Forms Application
- 2. Add a Planswift to the References (Planswift_Tlb)
- 3. Add a button to the form
- 4. Copy code below to the onclick event of the button
- 5. Compile and run
API
...
Calls
Delphi
Code Block |
---|
language | delphi |
---|
theme | RDark |
---|
firstline | 1 |
---|
title | Using IItem Object Model |
---|
linenumbers | true |
---|
collapse | true |
---|
|
procedure TForm1.GetSetPoint(sender: TObject);
var
ps: IPlanSwift;
area,sect: IItem;
xs,cx,cy: Extended;
pgw,pgh,p1x,p1y,p2x,p2y,p3x,p3y,p4x,p4y: Extended;
begin
ps := coPlanswift.Create;
area := ps.GetItem('Job\Takeoff');
area := area.NewItem('Area','SetPointArea');
sect := area.NewSection('SetPoint Area Section');
pgw := ps.SelectedPage.GetPropertyResultAsInteger('PageWidth',0);
pgh := ps.SelectedPage.GetPropertyResultAsInteger('PageHeight',0);
xs := ps.SelectedPage.GetPropertyResultAsFloat('ScaleX',0);
cx := pgw /2;
cy := pgh /2;
p1x := cx - 20 * xs;
p1y := cy - 10 * xs;
sect.NewPoint(p1x,p1y);
p2x := cx + 10 * XS;
p2y := p1y;
sect.NewPoint(p2x,p2y);
p3x := p2x;
p3y := cy + 10 * xs;
sect.NewPoint(p3x,p3y);
p4x := cx - 10 * xs;
p4y := p3y;
ps.NewPoint(sect.GUID,p4x,p4y);
ShowMessage('Now will fix the first point by using set point');
p1x := cx - 10 * XS;
ps.SetPoint(sect.guid,0,p1x,p1y);
end; |
Code Block |
---|
language | delphi |
---|
firstline | 1 |
---|
title | Using PlanSwift Object Model |
---|
linenumbers | true |
---|
|
|
C#
Code Block |
---|
language | c# |
---|
theme | RDark |
---|
firstline | 1 |
---|
title | Using IItem Object Model |
---|
linenumbers | true |
---|
|
|
Code Block |
---|
language | c# |
---|
theme | RDark |
---|
firstline | 1 |
---|
title | Using PlanSwift Object Model |
---|
linenumbers | true |
---|
|
|
VB/VBA (OLE)
Code Block |
---|
language | vb |
---|
firstline | 1 |
---|
title | Using IItem Object Model |
---|
linenumbers | true |
---|
|
|
Code Block |
---|
language | vb |
---|
firstline | 1 |
---|
title | Using PlanSwift Object Model |
---|
linenumbers | true |
---|
|
|
Pascal Scripting (OLE)
Code Block |
---|
firstline | 1 |
---|
title | Item Object Model |
---|
linenumbers | true |
---|
|
|
Code Block |
---|
title | Root Object Model |
---|
linenumbers | true |
---|
|
|
Pascal Scripting
Code Block |
---|
firstline | 1 |
---|
title | Item Object Model |
---|
linenumbers | true |
---|
|
|
Code Block |
---|
title | Using the PlanSwift Object Model |
---|
linenumbers | true |
---|
|
|