Thanks for watching! If you are interested in learning how to write Python in Dynamo, check out my course here: courses.designtechunraveled.com/dynamo-for-revit-programming-with-python
I made a script with Chatgpt to select all rooms in view with a specific parameter . Then I asked to change a parameter of the chosen rooms to another . We had over 100 rooms per floor , some rooms where color codes a certain color . So I had to change over 500 rooms in different phases . An issue I had was of paramter where chosen of the whee text or numbers . So I asked Chatgpt to write a checked and it worked .
I've been curious to see your feedback on this! Great video. I'm one of those that was asking about it in the forum. I've been trying to dimension nested instances in linked model, it's done really well with most of it. But there's a corner post at the end of the curtain wall and the reference I'm trying to get doesn't have a name on it, but I can tell it's at index five... the only method I see to get it is asking for get reference by name.
Thanks! Yes. It is a promising technology, but it requires spot-checking. :) ReferenceByName is awesome. It uses named reference planes in the family to retrieve the (dimension-able) reference.
While I haven't had any luck having ChatGPT generate anything that actually works in Dynamo, I have had success asking it to fix issues in its output. eg: in your first examples, you could have responded-"its selecting all the walls, can you modify the code to just delete just the wall instances?" . Or in your last example, you could have told it that its using Pyrevit methods instead of dynamo methods.
Hey John, I know some of the code doesn't work as expected on the first try. Do you think it's possible today to use code to train GPT by using the latest Revit API documentation as a dataset?
Hey Sean! I imagine that is doable! I would also like to train the model on select Github repos that exhibit good coding habits. Will have to test that next.
Thanks a lot for instructing me on it. I would like to use to try generating a lot of doors 's elevation by Dynamo through this method but the python script doesn't work and I don't know how to resolve it. By the way, thanks
Something like that is going to definitely be a bit more difficult as that has several steps. Thinking out loud from a coding point of view it would be > Collect All Doors > Get door location and facing > draw a section or elevation marker facing the door. So it might be worth breaking down the prompt for each step.
Thanks for watching! If you are interested in learning how to write Python in Dynamo, check out my course here: courses.designtechunraveled.com/dynamo-for-revit-programming-with-python
I've been playing around with gpt and a couple of others recently. It's been very interesting
Definitely. I recommend checking out Runway as well.
Holy shit, that's perfect!
I didn't think chatgpt could write code using revitapi. We are entering a new era of automation! :)
it is definitely very interesting and I think it can be helpful as long as the end-user knows what to keep an eye out for.
I made a script with Chatgpt to select all rooms in view with a specific parameter . Then I asked to change a parameter of the chosen rooms to another .
We had over 100 rooms per floor , some rooms where color codes a certain color . So I had to change over 500 rooms in different phases .
An issue I had was of paramter where chosen of the whee text or numbers . So I asked Chatgpt to write a checked and it worked .
Very cool!
I've been curious to see your feedback on this! Great video. I'm one of those that was asking about it in the forum. I've been trying to dimension nested instances in linked model, it's done really well with most of it. But there's a corner post at the end of the curtain wall and the reference I'm trying to get doesn't have a name on it, but I can tell it's at index five... the only method I see to get it is asking for get reference by name.
Thanks! Yes. It is a promising technology, but it requires spot-checking. :)
ReferenceByName is awesome. It uses named reference planes in the family to retrieve the (dimension-able) reference.
While I haven't had any luck having ChatGPT generate anything that actually works in Dynamo, I have had success asking it to fix issues in its output. eg: in your first examples, you could have responded-"its selecting all the walls, can you modify the code to just delete just the wall instances?" . Or in your last example, you could have told it that its using Pyrevit methods instead of dynamo methods.
Oh, nice catch. I am going to have to try that. I didn't even think to keep having the conversation with it. lol
Hey John, I know some of the code doesn't work as expected on the first try. Do you think it's possible today to use code to train GPT by using the latest Revit API documentation as a dataset?
Hey Sean! I imagine that is doable! I would also like to train the model on select Github repos that exhibit good coding habits. Will have to test that next.
Thanks a lot for instructing me on it. I would like to use to try generating a lot of doors 's elevation by Dynamo through this method but the python script doesn't work and I don't know how to resolve it. By the way, thanks
Something like that is going to definitely be a bit more difficult as that has several steps. Thinking out loud from a coding point of view it would be > Collect All Doors > Get door location and facing > draw a section or elevation marker facing the door. So it might be worth breaking down the prompt for each step.
I asked it to write python code to delete unused view templates and filters
# Import required libraries
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
import clr
import sys
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(pyt_path)
# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
# Get the current document
doc = DocumentManager.Instance.CurrentDBDocument
# Collect all filters and view templates
filters = FilteredElementCollector(doc).OfClass(ParameterFilterElement).ToElements()
view_templates = FilteredElementCollector(doc).OfClass(ViewTemplate).ToElements()
# Delete unused filters
for filter in filters:
if not doc.IsElementReferenced(filter.Id):
doc.Delete(filter.Id)
# Delete unused view templates
for view_template in view_templates:
if not doc.IsElementReferenced(view_template.Id):
doc.Delete(view_template.Id)
# Save the document
Interesting! How did it work out?
@@DesignTechUnraveled it needs help. View Template is not defined correctly