Learn Python Programming (2018) on Udemy – Completed

Hello everyone. As a continuation to my previous post HERE, I would like to announce that I have completed my course.

Allow me to list down with you what I have learned in this free Python Programming course on Udemy just in case you are interested in knowing some of them; or all of them.

  1. What is the correct way to add a comment in Python?
  2. What is the correct way to set variable, say, ‘s’ equal to the string, say, “Hello World!”?
  3. What type of variable is a True or False?
  4. What type of variable is, say, 100.45?
  5. Arithmetic and Concatenation
  6. Data Structures
  7. Control Flow
  8. String and List Methods
  9. Typecasting and Escape Sequences
  10. Getting User Input
  11. Functions
  12. Importing Modules
  13. And finally, how to make a GitHub Repository

In order for me to remember all of this, I need to keep reviewing my notes from time to time or find a way to apply this in my current field of work.

For those who wants to learn Python Programming, I highly recommend this course for you. The course itself is just an hour long but since I made some notes and did some readings, it took me 4 hours to complete the course (2 hours for each separate dates).

Once again, here is the link for the course: Learn Python Programming Course

Have a great day.


Allan Cantos EngTech MICE

BSc Civil Engineering / Principal Structural Technician

Revit-Dynamo-Power BI Guide eBook on sale!

Click the image below to get your copy.

Any issues, errors or corrections, please give me a shout and I’ll sort it out quickly.

Happy reading and doing the exercises .

I trust you’ll find the tutorial helpful.

Best regards,

Allan Cantos EngTech MICE

BSc Civil Engineering / Principal Structural Technician



Learn Python Programming (2018) on Udemy

Hello everyone! How are you all doing? I trust you are well.

For some of you who are interested in learning the basics of Python programming, I came across this course in Udemy  and I would love to share this to you. Python is still the fastest growing major programming language and if you want to learn some basics, please click on the link provided below to get yourself started.

Learn Python Programming Course

Have a great weekend and enjoy learning.


Allan Cantos EngTech MICE

BSc Civil Engineering / Principal Structural Technician

Exporting Pile Coordinate from Survey Point instead of Project Base Point

How are you doing guys? I trust you enjoyed the summer we experienced in the past days, if you live in the UK. I believe the heatwave is now over according to the news. If you live in different parts of the world, I trust you are well.

In my previous posts about numbering piles using Dynamo without programming knowledge (links provided below), I tried to assign a unique pile number for my piles using Dynamo where I extracted the X and Y coordinates of each pile then export the values to spreadsheet (discussed in Part 1). And in Part 2, because I can’t work out how to sort in X-coordinate and Y-coordinate simultaneously in ascending order, I decided to sort the coordinates in Excel instead to an order that I wanted before assigning a unique pile number. After that, with the help of Dynamo, I pushed back to Revit the pile number value to the assigned Pile parameter.

Here are the links for the 2 parts to refresh you of the process.

Part 1: http://allscan12.com/index.php/2017/09/29/numbering-piles-using-dynamo-part-1-no-programming-knowledge-required/

Part 2: http://allscan12.com/index.php/2017/10/07/numbering-piles-using-dynamo-part-2-no-programming-knowledge-required/

For a challenge, I received a message from one of my blog readers asking me if it is possible to read the coordinates from Survey Point rather than Project Base Point. With his permission, see image below. Hmmmn, how will I do that. I need to do a bit of research here.

Thank you Kieran, by the way, for purchasing a copy of my Revit-Dynamo-Power BI Guidebook and I hope you’ll find it useful. Any question, give me a shout and I’m happy to help.

For some of you who would like to see the live demonstration, please come to my Laboratory Class at BiLT Eur 2018. For more details on how to purchase a ticket, please visit BILT EUR 2018 website.

By the way, from today you can avail of 10%  discount off the 3 Day Delegate rate (excluding accommodation) by clicking on the image below: Code to use will be ALLSCAN12

Anyway, back to our topic, you can achieve this using a third-party Revit plugin called “Excitech Tools”.

And here is the sample information you’ll get by hitting that “Coordinate Schedule” button on your “Excitech Tools” Revit plugin for pile P001 (this is the pile that we will be looking at as an example).

You’ll be provided with coordinates based on Project base Point and Survey Point.

To clearly understand where these values came from, see image below.

And the “Element.GetLocation” node in Dynamo will give you the coordinates relative to the Project Base Point.

In the absence of the third-party Revit plugins, such as the “Excitech Tools” Revit plugin, I will aim to publish the northing and easting coordinates of my piles based on the “Survey Point”. Take note, Survey Point not Project Base Point.

While looking for potential solution to my problem, I came across a discussion in Dynamobim.com Forum about the same issue.

Here is the link to the discussion: https://forum.dynamobim.com/t/getting-coordinates-from-project-base-point-or-from-survey-point/7499

Somehow it gave me an idea of how I’ll achieve my goal, however, the information I’ve got from the forum wasn’t enough to solve the issue.

So, I ended up doing more research and I came across a YouTube video from Mr. David Flynn of Designtech (www.designtech.io).

See the video here: https://www.youtube.com/watch?time_continue=72&v=aIvv1oKDgeQ

Mr. David Flynn is so generous to share the script and the dataset he used in the video for us to download for free and for us to give it a try. So I downloaded the Dynamo script and had a look at it.

Here is what the Dynamo script looks like from Mr. David Flynn of Designtech:

Base on this, I came up with something to achieve my goal; to be able for Dynamo to provide me the pile coordinates from Survey Point instead of Project Base Point. I found some nodes that I needed to make my script work.

Here is my script looks like:

The script, which I named “COORDINATES EXPORTER” in Data-Shapes UI, was set up in a way that you can export to spreadsheet the coordinates from either Survey Point or Project Base Point (depending on the user input). Thanks to Data-Shapes Dynamo package for the UI that I used in this script.

To know more other stuff from Data-Shapes, please visit the website at https://data-shapes.net/.

And here is what you’ll see from Dynamo Player.

Hit play button from the Dynamo Player or hit Run if you are at the Dynamo interface, you’ll be prompted to select from the drop-down list what coordinates type you would like to reference the output coordinates.

First is to select which reference you would like your coordinates to be taken/exported.

And next, you will be able to specify the number of decimal places for the output values.

To give you the idea of the results, please see images below.

With the Survey Point selected under coordinates type:

With the Project Base Point selected under coordinates type:

I have to revisit my script because I specifically asked to have my results to 3 decimal places but when it is zero, it’s not showing up, i.e. I’m expecting a result to be 9100.000 but the actual result gave me only 9100 (without decimal points).

Now to complicate things, let me add some rotation angle to True North, say 110 degrees.

And by applying a rotation Angle to True North, the Survey Point rotates relative to the Project Base Point if it is “clipped”.

You’ll notice that the location of the new Survey Point has shifted and because of that, we have a new coordinate of pile P001 as shown above.

I’ll run the Dynamo script and the “Excitech Tools” Revit plugin just to compare the results. Results are shown below.

And with the Project Base Point selected under coordinates type:

Looks like my script did not take into account the rotation angle to true north because I’ve got different results to what the “Excitech Tools” Revit plugin gave me.

To clearly understand where those “Excitech Tools” Revit plugins results came from, please see images below.

From Project Base Point:

From the new location of Survey Point:

By the way, if you want to keep the Project Base Point Coordinate at (N=2 and E=2), you can re-position your Survey Point anywhere if you wish but make sure to “unclipped” it first (this should be the agreed shared coordinates for all disciplines).

If you want to give this a try, here is the link where you can download this script:

Some of the nodes can be combined using code block, however, to easily understand what is the node doing/required, I tried my best to use the proper node instead. Any issues with the script, improvements, correction, etc. please let me know.



Allan Cantos

Placing a view to a current sheet using Dynamo

Today, I decided to write my step-by-step procedure on on how to add a certain view on the current sheet using Dynamo. This Dynamo script must also be available to Dynamo Player with a minimum input from the user.

Assuming here is my sheet:

And the view that I would like to add to this sheet is a “WORK IN PROGRESS” stamp that I created as a legend. It should look like the one below.

For this demonstration, let’s keep this view as a “Legend” because I want to point out that whenever you are in this situation, you can’t copy the views under “Legend” from one sheet to another specially if you are aiming to have that view at the same spot to various sheets.

Here is what you’ll get if you select that view (WORK IN PROGRESS) and hit CTRL-C:

You are not allowed to copy a Legend view but there is work around to place it manually and have it exactly at the same position as to the other sheets, however, it will be a bit laborious task. Because of this, I decided to create a Dynamo script to automate this process, so let’s begin building the script.

Here is the first part of my script:

Here is the “Views” node where I specify from the drop down list the view that I would like to add to the sheet.

Next, I’ll specify where on the sheet I would like the “WORK IN PROGRESS” view to appear and here are the nodes that I used:

And finally, here is my set of nodes to place the view on a sheet:

Now, it is time to connect those wires and you should have something like this:

Save the Dynamo Script and name it appropriately. I’ll call mine as “Placing View on Sheet”.

Next, open your Dynamo Player and search for this script.

And here is the little video demonstration of how the scripts works on Dynamo Player:

Here is the link if you want to give it a try: Placing View on Sheet

Have a great day!


Allan Cantos EngTech MICE

BSc. Civil Engineering / Principal Structural Technician