Im having issue setting a parameter by name, in a sequence. Specifically, it is the view Number. I first grab the parameter value, and append an x to it , to ensure new unique numbers, and that the second setting of these values wont give me a “existing detail number” error. 1 would be 1x. 2 would be 2x and so on.
I then need to set the new numbers based on their location (the purpose of the script). For some reason I cannot get these two operations to work in tandem, even with transactions and stuff. Any Ideas?
The intent is to rename view numbers based on our detail cell grid. Each view gets evaluated based on its view title location, and finds the closest cell grid. Then it should rename the view number. All is good here, the problem is setting the value of the view number, see images below for further explanation of problem.
Because this forum, doesnt allow multiple images ughh, Please see attachment here: http://docdro.id/EP1K9Di
I’ll try to look into it tomorrow, anyways try using “Element.SetName” node, or something like that to rename the views and see if you stop getting the “read only” error
Ok trying to do the same thing in python revit shell, and i get the same error. My hunch is that for somereason the viewport parameter “Detail Number” locks up (aka turns read only) in the api for some reason. It runs successfully the very first time I ran it but never again… any ideas?
My debugger says the following:
'Could not edit ''Detail Number'' on '<Autodesk.Revit.DB.Viewport object at 0x0000000000000059 [Autodesk.Revit.DB.Viewport]>'. It is either readonly or not user editable. User modifiable: 'True' // Read Only: 'True
'Could not edit ''Detail Number'' on '<Autodesk.Revit.DB.Viewport object at 0x000000000000005A [Autodesk.Revit.DB.Viewport]>'. It is either readonly or not user editable. User modifiable: 'True' // Read Only: 'True
'Could not edit ''Detail Number'' on '<Autodesk.Revit.DB.Viewport object at 0x000000000000005B [Autodesk.Revit.DB.Viewport]>'. It is either readonly or not user editable. User modifiable: 'False' // Read Only: 'False