Coulmns dimension getting null values at last node

hi all I’m trying to follow aussie BIM guru in one of his scripts to automate dimensions for columns by getting the refrence lines of the family and keep getting null error in the last node.

What is the output of the List.IndexOf node? that might help troubleshoot the issue.

Hi Jagger the output is -1 as you can see in the screen shot, and it’s the one that making the last node getting null

so that means that the string you are looking for is not present within the list of the Element.Name node. make sure everything in the string is written EXACTLY how it is in the list. I also see that you have a “;” at the end of your string. That is probably not necessary. If you still cannot get it to work can you upload a screenshot of the Element.Name output?

1 Like

ok it worked with no errors but the dimensions are not showing in plan

1 Like

Im not sure about that one… When you say not showing in the plan what do you mean by that like what is the goal of the script? I read the original question but I am still a bit confused.

It should apply horizontal and vertical dimensions from the nearest grids to reference lines in the columns family that I specify

Hello, at the Dimension ByRefrences node you send string instead of DimensionType

cordially
christian.stan

1 Like

yup what christian said! I am guessing that you are filtering for the dimension you want in the graph so you probably want to connect the GetItemAtIndex node to the Dimension.ByReference node.

1 Like

okay how should I connect it what inputs should I put

like said by M. Jagger

cordially
christian.stan

did that noe errors but still nothing appeared and getting null

Have you tried this node (Package ?) with 2 references and a line to see if there is a problem (IronPython2 and CPython engine)?

Can you send your revit and dyn?

cordially
christian.stan

hi christian
this is the dyn file and for revit the file is too big so I uploaded to one drive
create column dimension.dyn (67.8 KB)
CORE_New Project Template-R23.rvt

1 Like

Hi, this is a first for me to touch on these dimensions, on a basic example, I can’t even get a convincing result (I’m not sure I’ll be of much help, sorry)

I don’t know if we can mix curve and face even though the input information specifies yes.

Must be a problem on my side.
I will see this later
good evening and New Year’s Eve

edit

based on a line in the axis of the grid it works, there must be a subtlety that I have not yet grasped at the grid level (and geometric reference of this one)


Sincerely
christian.stan

1 Like

Happy new year my friend.
I’ll wait for your response if you got time

1 Like

Hi
I tried via API with 2 gridlines only:
Classes and Methods Used:
Document Class
NewDimension method
ReferenceArray a constructor + Append Reference
Obtaining the reference from the curve property
and entering a transaction
totally an error
in short not proving an error or more probably but or
I don’t know, I’m out of ideas

import sys
import clr

clr.AddReference("RevitAPI")

import Autodesk 
from Autodesk.Revit.DB import *

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager 
from RevitServices.Transactions import TransactionManager 

doc = DocumentManager.Instance.CurrentDBDocument
#Inputs
g1=UnwrapElement(IN[0])
g2=UnwrapElement(IN[1])
elt=UnwrapElement(IN[2])
#References
r1=g1.Curve.Reference
r2=g2.Curve.Reference
#ReferenceArray
refar=ReferenceArray()
refar.Append(r1)
refar.Append(r2)
#Line
li=elt.Location.Curve
#View active
activ=doc.ActiveView

TransactionManager.Instance.EnsureInTransaction(doc)
dim=doc.Create.NewDimension(activ,li,refar)
TransactionManager.Instance.TransactionTaskDone()
OUT = r1,refar,li,activ,dim

good evening and happy new year to you too
Sincerely
christian.stan

Thanks for your effort christian

1 Like

Yep, my attempts are in vain for the moment, but I will eventually get there, in my research I saw a message from Mr. Paul Wintour (I have to dig into this to find time, it’s always difficult)
As you did not answer me about the custom Dimension node used (go to the genius loci package and try to configure the levels for your incoming reference)

Sincerely
christian.stan

Not something I can personally help with, but I know @GavinCrump is pretty active on here, so if there is anyone that can help with an Aussie BIM Guru script, it’s the man himself!