Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Formulas #1

Open
tmwarchitecture opened this issue Mar 31, 2018 · 2 comments
Open

Custom Formulas #1

tmwarchitecture opened this issue Mar 31, 2018 · 2 comments
Labels
0.x cross-platform, python enhancement New feature or request
Milestone

Comments

@tmwarchitecture
Copy link
Owner

No description provided.

@tmwarchitecture tmwarchitecture added the enhancement New feature or request label Mar 31, 2018
@tmwarchitecture tmwarchitecture added this to the 0.3 milestone Apr 1, 2018
@visualizor visualizor added the 0.x cross-platform, python label May 19, 2020
@visualizor
Copy link
Collaborator

is this something that can be implemented for 2.0 release?

@tmwarchitecture
Copy link
Owner Author

Seem like a lot of work, but here's my thought. Its a column that displays the value from a user input expression. This could then, for example, allow people to do =Area * 300 to see a cost factor, where Area is a keyword linked to the area column. Or =(Area) / 200 to display an estimate for car parking. Or =Length/(numPts-1) if you wanted to see the average length of a polyline segment. Or =Volume*2315 to get the mass of an object. Or maybe you are 3d printing and want to know the cost of your object =Volume/23.21.

For now the function could just return floating point values, but if booleans were returned and logic was introduced as keywords you could have something like =if(Area>400, True, False)

The hardest part is creating this user entered language that can be parsed into a mathematical formula. It has to be something like the eval() or exec() function in python. But is stored as a function with variables.

There would be a new property (column) in Tabl_ called something like "Custom Formula". Would be great to have as many as the user wants, but then the GUI would have to dynamically adjust (seems tricky?), so I think just one Custom Formula would make sense for now. This column displays the value output of the user entered expression.

There needs to be a new dialog that is activated either through the context menu, or settings that has a textbox input where the user enters the expressions (see revit image below). If the column header could also be changed so it can display a custom name, that would be a bonus (example: "Cost" or "Weight")

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.x cross-platform, python enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants