I am trying to alter a Python script a little bit.
The script overrides dimension values which works great.
I want to edit the script so a user can choose wether the script: overrides the value of the dimension, Adds a value below the dimension, or adds a value above dimension (dim.ValueOverride, dim.Above, dim.Below)
IN was apointed for this and is called ‘positie’
If i change ‘dim.ValueOverride’ to ‘Positie’ in line 24 of the script, nothing happens.
I bet this is just a very simple issue that starts and ends with my lack of understanding of Python…
Anyone who can help me out?
Attatched screenshot below for clarification:
# Enable Python support and load DesignScript library import clr clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import * clr.AddReference('RevitServices') import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument # Functions def getForm(dim, brick, brickN, seam, seamN): val = round(dim.Value * ftmm) x = str(int(round(val / brick))) if val % brick == seam: form = x + brickN + " + " + seamN elif val % brick == brick - seam: form = x + brickN + " - " + seamN elif val % brick == 0: form = x + brickN else: form = str(int(val // brick)) + brickN + " + " + rest dim.ValueOverride = form return form # The inputs to this node will be stored as a list in the IN variables. if isinstance(IN,list): allDims = UnwrapElement(IN) else: allDims = [UnwrapElement(IN)] brick = IN seam = IN brickN = IN seamN = IN ftmm = 304.8 rest = IN Positie = IN forms =  TransactionManager.Instance.EnsureInTransaction(doc) for dims in allDims: if dims.Value == None: form =  for dim in dims.Segments: form.append(getForm(dim, brick, brickN, seam, seamN)) forms.append(form) else: form =  form.append(getForm(dims, brick, brickN, seam, seamN)) forms.append(form) TransactionManager.Instance.TransactionTaskDone() OUT = forms`Preformatted text`