How to solve this node warning?

i got this warnig message from dynamo 2.18

Dimension.ByElementDirection expects

argument type(s)

(Revit.Elements.Views.View,

Revit.Elements.Element,

Autodesk.DesignScript.Geometry.Vector,

Autodesk.DesignScript.Geometry.Line,

string, string), but was called with

(Revit.Elements.Views.FloorPlanView, var

, Function, null, string, string).

please kindly help to fix the error if you can.

thanks, gideon

That Vector.X node is the X component of an existing vector input. There’s another similarly named node that will give you a vector of the x axis.

1 Like

Hello @mmegc,

Drop out the node results and you will see the vector.x node doesnt return a vector. This is because it expects an input vector. As you dont feed anything to the input the node returns a function.

If you just want to get the base x vector, you are using the wrong node. Type “x” in the dynamo dearch bar an you’ll find it.

thanks, i got no warning now.

but for this floor plan i drew on “second floor (principal)”

i did not see any dimenions even after I run the script

please give me some idea on how to make it work.

thanks, gideon

You’ll have to do some troubleshooting. What is the output from the Dimension node? Do the element Ids exist in your model? Does the view have dimensions turned on?

hi, nick,

dimension is turned on in the view.

in my dimesnion node, there is no out put.

but what do you mean does the element id exist?

sorry, gideon

The node implies that it returns the newly created dimensions. Those would have an element Id that you could check. If there’s no output then something is obviously not working. Can you show us the full graph with all node previews pinned after it’s been “successfully” run?

here you go nick

All Elements of Category isn’t returning any elements. So there’s nothing to dimension.

For wall types, you need to use Element Types and All Elements of Type (or Element Classes and All Elements of Class in the latest version).

thanks for your help. i tried to use your suggestion, but got these error

Dimension.ByElementDirection operation
failed.
Object reference not set to an instance of
an object.

for the following graph

thanks, gideon

It could be that the custom node doesn’t do what you want but you’re also not providing a valid class name. Use the out of the box Element Classes node so you can select the appropriate Wall Types.

thanks , nick, maybe i am not using it properly

i got

Dimension.ByElementDirecĂźon operation
failed.
Object reference not set to an instance of
an object.

warning from

thanks for your help. sorry i am new to dynamo, please help to solve this warning

“Basic Wall” and “Interior - 41/2” aren’t element classes.

If you use the ‘Element Classes’ node you’ll see all valid element classes in the dropdown.

1 Like