For your parameter input, are you allowing users to input a type or instance parameter? If it is a variable, then that makes it a bit tougher. But if it is always a type parameter, you would then get the core wall type from the elements after the UI is presented.
Yeah, Iâm having the user input the Parameter name and then the written input. After reading your comment it would make sense that they donât really need to input info if itâs tied to the family.
So I could have them pick the wall they wanted (perhaps have the list filtered to only show walls with the word âratedâ in them) to put the line on and the line family.
Any idea why the script only works on a wall once? I noticed this morning that if I ran the script on one level and then tried it a level up that it wouldnât place the line family on a continuous wall that I put the line family on in the level below (does that make sense?).
Are you running it exclusively in Dynamo player?
No, Iâm running it through a toolbar I made through PyRevit. That is why I have the Data-Shapes UI, otherwise I would have just selected nodes as input for the UI.
Hmm, it might need to have some logic added to âpull a curve onto the planeâ for the active plan view
I had a similar situation once (with a family consisting of line-like elements)
Your objects may be on top of each other (even if present on 2 different levels)
(I had settled with Point.z on the family, if that can help)
Cordially
christian.stan
Can you explain further what you mean by settled with point.z?
@christian.stan
I tried that and it didnât work. I even tried placing the z.point to the active level. That put it at a different point, than zero, but it wasnât showing up on the sheet still.
The screenshot shows the nodes disconnected because I was trying to again with the old connections and only pulling all elements of a category from the active view instead of the entire model.
@john_pierson
Iâm not entirely following what you are suggesting. I found a node by that name, but wasnât sure how to use it in the script.
For what itâs worth Iâm uploading an updated copy of the file
Place rated wall family lines_DATASHAPES_script.dyn (93.5 KB)
Thanks
Wait⊠are you not using a line-based detail component?
Nevermind, I saw that you are. I was just a bit confused about the getting of the start and endpoints. Seems unnecessary to me.
I think the entire graph can be simplified quite a bit using dictionaries too. Without the Revit sample files on this, it makes troubleshooting and testing considerably harder, unfortunately.
I can try to mock up some samples based on how I would do this process, but once again, that might not match what you need.
But, here is what I meant about pulling onto plane
You can send your family (if not confidential)
cordially
christian.stan
DMâd
Thanks, Iâll give this a go
John,
Thanks! I was able to get it to work using that workflow!
What are you referring to with Dictionaries? I know I have learned some about dictionaries in Python.
Something like this â
my_dict = {1: âboxâ, 2: âcircleâ, 3: ârectangleâ}
Yep! Dictionaries are very similar in that way in OOTB dynamo.
So in your example you could do something where the detail components are the value and the keys would be the fire rating.
This would enable something like:
FireRating1 = DetailComponent`
So now when you ask the dictionary for the DC that corresponds to FireRating1 it would auto-return that.
I hope that makes sense, lol. I donât have Dynamo open right now.
I am posting in here again because I had this script working, but then didnât use it for a while and recently had a person in our office want to use it and it didnât work.
I looked into it and there was an error about add-ins. I had recently installed Orkestra and when I uninstalled that the error went away. It still isnât working though and there are no error codes on any of the nodes. I did get this overall error code about Python 2 and 3, but Iâm pretty sure Iâve seen this before and just said okay and scripts still worked. Could this be the issue?
In the screenshot below you can see that it appears that all the info is there, it is showing the lines in model space in Dynamo, but the line isnât showing on the exterior walls.
-start/end points
-correct family type
-correct active view
Here is a copy of the file:
Place rated wall family lines_DATASHAPES_script.dyn (76.0 KB)
Thanks
So I ran this in our 2023 template file and it produced the line as expected. I ran the script in a different project file (from the project I used in my last post) and the line didnât show. And, it actually doesnât show the script being ran if I try to undo it. If I run the script with Dynamo open then it runs but it shows ânullâ as in my last post.
It seems like there must be some type of issue within the projects, but I canât think what. It is selecting the walls and even the ânullsâ I believe are the correct count. Itâs just not creating the new lines.
Any ideas on things I could explore as possible issues?
Thanks
Install the IronPython 2.7 Package