Hello,
I backed myself into a corner with a previous script and now I need to copy the sheet name to the viewport name on each sheet. The only problem is that there are multiple masking viewports on the sheet and I need to filter them out and only rename the one real viewport. I think Im pretty close but its refusing to write the info back into the View Name parameter. I am pretty sure I am getting confused on my list organization some how but I need some more advance eyes to look at it for me please! I think it has to deal with I filtered out everything so now everything is strings, and I lost the relation to the list of elements, so I dont know how to coordinate the two so that they are properly named with each other.
I read 2 issues here:
- “its refusing to write the info back into the View Name parameter”
- "I lost the relation to the list of elements"
I don’t have much time at the moment to look at it but I (or someone else) will. For the first question, you probably need to verify the type of data required as an input. For the second issue, you can first take a look here:
Inconsistency by filtering
Although it was a worth while read, I dont know how it would apply to my situation exactly. I think you might be on to something with index and list.map but I dont really understand those nodes too well, so I have no way of knowing how it will work with any assurance. Any advise would be clutch at this point. thanks!
Yeah I tried it with that Springs Dictionary key node, and I seem to just be botching it all up.
Look carefully: you are trying to set a parameter value to a list of strings while you need to set it to a filtered list of elements, like so:
Ok, well that seems to make a lot of sense, but I am getting an error message that says that I am duplicating view names, which is understandable, except for the fact that the first drafting view error was supposed to be filtered out in my bool mask.
- Why is it still in the list to be modified and causing this error?
- Can I filter views out by type? ie. Drafting View, Floor Plan, etc?
- Is there a way to put in an error handler to rename, a view, after the Rename, if the rename contains a duplicate name like this? (you might have to read that twice)
Thanks!
It would probably need further investigation but first, I would say that your boolean mask does not match your initial list, since it’s already reduced by the first FilterByBooleanMask node. This could be why…
yeah, thats what i need help with. the filtered list and the element list arent the same size. That was one of my original questions. I want need to filter down the list to trim off what I dont want, then use that list to make changes to it. how do i do that then?
You need to filter only once. Try this instead (this String.Contains node is from Archi-lab Grimshaw):
I can’t replicate this situation but I would suggest to insert a Flatten node just after View.GetViewport
Alright well I determined that I cant use the custom String.Contains node from Grimshaw because it doesnt seem to want to take the string list like you have there. But that aside I figured it out most of the way but I am getting an error message as I try to write in the names of the parameters. It says that some of the View Names are ‘read only’ but thats not true. Can you @Yna_Db or anyone else please tell me what I am doing wrong? Thanks so much!
Personally, I don’t know. Element.SetParameterByName works in my case, so it should be something else. Please note that your graph is a bit confused and hard to read for others: some more groups and titles could help…