Change titleblock failed

Hello! I’m trying to change titleblocks on specific sheets and I tried to change one just for test but the titleblock didn’t change. Here is the last node that has error.

Many thanks!

I attached my file just to make it easier! Thanks!

Change Title Blocks on Specified Sheets practice.dyn (48.2 KB)

The titleblock is a family type, so you need to change the actual family type and not a parameter called Type. Try these nodes. The Element ChangeType node is from GeniusLoci.

Since you are probably pulling just names from the inputform, you may have to set it like this

I tried yours but it didn’t work out

That’s my bad. I didn’t see that you are returning actual family type and family from the inputform box. Try feeding the x[0] output from your code block directly into the Element ChangeType node and bypass the Family.ByName and Family.Types nodes. And feed the x[1] output from the code block directly into the Family.Types node and bypass the Family.ByName node.


Is this the way you were approaching?

@gtangWZEDY ,

could it be Listdepth @L2 ?

x[0];
x[1][0];

image

That is the way I was thinking, but your code block is returning an error. So you need to fix that first. You may need to save and close your graph and re-run from scratch to clear the code block error. Sometimes running the script consecutively will cause that to happen.

image

image
image

I’m super new to dynamo so I’n not too sure what it means here. I’ve also attached my script in the post if you want to just go in and take a look that’d be greatly appreciated!

If you change your parameter name to “Family and Type” this should work.

I actually tried that but nothing changes

Can you expand the picture, soo that I can see the inputs. I can see that x[0] should be Value (Family and Type), and x[1] should be Element, but I cant be sure until I see your inputs :slight_smile:


Change Title Blocks on Specified Sheets practice.dyn (50.9 KB)

Did you try changing x[0] to Value and x[1] to Element, and also chaning Parameter name to “Family and Type”? Since in your List.Create your first element is Family type and your second element is Sheet Titleblock.

1 Like


So there is no error now, but the titleblock did not change to the one that I picked and keep the same

1 Like

Hmmm, strange it should change the titleblock…

you could check here… there is also .dyn file in this post

I saw the script, but it’s different than what I’m trying to do, I wanted to be able to check all the specific sheets and change them at once and they are not all the same titleblock. thanks tho!

Downloaded and ran your script. You need to cross the inputs this way. Make sure to set the lacing to longest on the Element ChangeType node. If you don’t know how to do that, hover your mouse over the node and right click. The popup will show lacing, click that and select longest. Be careful though, when I ran it, I noticed the sheet list and corresponding titleblocks were not correct. And the sheet I selected to change the titleblock on didn’t change, but on another sheet it did change. I believe that is because in my test project, I have sheets that don’t have titleblocks on them, so you may need to account for empty or null values in the list you are feeding into Listview Data input box.

Thanks! Yes, I actually just noticed that some of the sheet lists don’t show up on the window, I thought it was because there were no sheets but they do. I’m not sure why tho. Same as I ran the script and nothing was changed, it’s driving my crazy. Should I mark as solved or keep it opened?

@gtangWZEDY
Don’t mark as resolved just yet. Run the script and show any errors here as you did before. If there are no errors, then expand out the results of the Element ChangeType node and the results of the selected nodes below and show them here. If the Element ChangeType node is showing results in the SuccessElements list, then it is changing the titleblocks, but just on different sheets than what you are selecting. So in that case it becomes a listing issue. Then at that point, you can mark this as resolved and start a new issue for the listing.