var
ps: IPlanSwift;
est: IItem;
itm: IItem;
prop: IPropertyObject;
begin
// Create Planswift Interface
ps := coPlanswift.Create;
// Get the Estimating Tab
est := ps.GetItem('Job\Takeoff');
// Create a New Area item
itm := est.NewItem('Area', 'NewProperty Example');
// Create a new Property Named "My Custom Property"
prop := itm.NewProperty('My Custom Property', 'Sample Formula', ptText);
// Add Property to the "API Properties" Group
prop.Group := 'API Properties';
// Show the Properties dialog box
itm.Edit(true);
// Free Planswift
ps := nil;
end; |