To open any link in a new tab, preserving your position in the current article, just hold down the <CTRL> key on your keyboard before clicking the link or click using your mouse wheel.

Useful Formulas for PlanSwift

This will give you some examples of formulas that can be used.


You will need to have a job open.

Go into Advanced Properties on a item you want the formula on.



[!Date]


Will create the current date when the item was created.


[!Time]


Will create the current time when the item was created. 


[\Job\Name]


Will give you the Job's Name.


[..\PropertyName]


Will get the parent item's property name. 


Example: [..\Qty] will give you the parent item's [Qty] property.


[..\..\Name]


Will give you the [Name] property of the parent of the parent item. 


[..]


Will get the parent's property with the same property name. [..\..] works as well if you need the grandparent's same property name. 


[..\!Units('Takeoff')]


Gives you the parent item's Takeoff property Units, so you can specify the parent item !Units of ('PropertyName') 


Example [..\!Units('Takeoff')] will give you SQ FT if the parent item is an Area. If the parent item is a Linear then the result would be FT.


For Labels must be [..\..\!Units('Takeoff')] . They are children's of sections, which do not have Units('Takeoff') specified.


[!FolderLocation]


Gives you the path to the folder the item is located in.


[!ExePath]


Gives you the path of the PlanSwift.exe file.


[\Settings\User]


Gives you the PlanSwift User Name.


[!Sum(PropertyName)]


Gives you a sum of all sub item or children items under that parent item; for example: [!sum(Price Total)] will give you the sum of all sub-items under that item. It's good for Assemblies to have sum of that property in () on all sub parts. 


[!RandomColor]


Will pick a random color each time you create a new item. 


Pi


Returns a value of 3.1415926535897932385 


Example: 
Pi*Sqr([Diameter]/2) 


This example could be used to find the area of a circle.


Hypot(Number1, Number2)


Will return the Hypotenuse of a right angle.


Sqr(Number) or X^2


Returns a number squared: the numeric value to be squared.

 
Example: 
Sqr(2) will return 4 
Sqr(4) will return 16 
Sqr(5) will return 25


Sqrt(Number)


Returns the square root of a number: the numeric value to find square root value of.


Example:

Sqrt(25) will return 5

Sqrt(64) will return 8

Sqrt(144) will return 12 


Exp(Number)


Returns e (the base of natural logarithms) raised to a power. This is a numeric value to be raised to e. 


Example: 
Exp(1) will return 2.72 
Exp(2) will return 7.39 
Exp(3) will return 20.09 


Round(Expression)


Returns a number of the value rounded to the nearest whole number. If X is exactly halfway between two whole numbers (X.5), the result is always the even number. This method of rounding is often called "Bankers Rounding". (Expression) This is a value to be rounded. 


Example: 
0.5 will round to 0 
0.75 will round to 1 
1.5 will round to 2 


Round(([Property]*2) +0.5)/2


Will round to the nearest half. 


Example: 
Round(([Takeoff]*2) +0.5)/2 


If [Takeoff] was 1.3 
result would be 1.5 


Ceil(Expression)


Returns a number of the value rounded up to the nearest whole number. This method of rounding is called "Round Up" 
(Expression) This is a value to round up to the nearest whole number. 


Example: 

Ceil(1.3) will round to 2 
Ceil(1.5) will round to 2 
Ceil(2.1) will round to 3 


Floor(Expression)


Returns a number of the value rounded down to the nearest whole number. This method of rounding is called "Round Down" 
(Expression) This is a value to round down to the nearest whole number. 


Example: 
Floor(1.3) will round to 1 
Floor(1.5) will round to 1 
Floor(2.1) will round to 2 


Min(Expression1, Expression2)


Returns the lesser of two numeric values. 
Expression1 This is a value to be used in the evaluation of finding which value is smaller. 
Expression2 This is a value to be used in the evaluation of finding which value is smaller.

 
Example: 
Min(2, 4) will return 2 
Min(10, 5) will return 5 


If ('[Stud Length]' = '8') then result := '8 foot stud 26PC'  Else 
If ('[Stud Length]' = '10') then result := '10 foot stud 2610' Else 
Result := 0


Returns a value based on what another property is set to. Then at the end If no value is set in [Stud Length] it will result in a 0.


If ('[PropertyName]'<= '8') then result := 8  Else 
If ('[PropertyName]'>= '10') then result := 10 Else 
Result := 0


Is an "If Expression" using < Greater or Less Than > signs. 


Example: 
if # is 9 if expression will return 10 
if # is 6 if expression will return 8 

Copyright 2023 ConstructConnect