Label.ByPointAndString Not Working

Am I correct in that label node is not working in Dynamo Studio 1.3? I am unable to see any preview of the label string in the model space,


I don’t think you’re supposed to see an text in the model space.

Thanks, being a newbie, is there a package other for allowing one to display text on geometry in Dynamo Studio?

Not that I’m aware of, unfortunately.

The Label.ByPointAndString node is a Revit node and as such you need to use Dynamo For Revit for it to work. Can you give some more info on what you’re after as there may be other solutions.

I am looking at displaying a node number next to a list of points in the dynamo viewer - I’m using dynamo studio not Dynamo for REVIT. I realize you can view the indices of elements in a list in the viewer but that is not what I want. thanks

So you want to select a list level and make a note of which points are at this level with a model element? Any chance you can sketch what you’re looking for on a sample?

Its not a revit model. I am looking at adding labels to the preview geometry in the Dynamo environment. Say I have a list of points, and the points are numbered starting at 1000, I want to be able to plot that label/id next to the point so it is displayed in the Dynamo environment. I don’t want to create that label as an element within the REVIT environment.

I understand you’re in studio and have no tie to a Revit model.

I’m wondering if the OOTB preview functionality has what you’re after.

Explains the preview and then click on one of the list elements or a list level - all items selected as either the list level or selected element itself receive a design script formatted index indication.

[0] means the first item in a flat 1d list.
[0,1] means the second item in the first sublist for a 2d list.
[3,2,4] means the fifth item in the third sub list of the fourth sublist for a 3d list.

Thanks for reply, I know about this feature but not what I wanted. I want ability for label to be a string, the example was just to illustrate the context of the problem. The label will not match the element index in a list.

Ah! You want to define a name and preview it’s location?

This doesn’t exist but I believe you could creste code to do this. The list level preview function would serve as a good base starting point.

I do not see any syntax in DS that allows one to explicitly draw labels.

There may be something in the DynamoCore that can be accessed not by DS but a python or zero touch?

Yes you would have to build out this functionality as a custom node.

the Dynamo Text package can kind of do this (it’s slow as it generates geometry based non billboard text)

If you wanted to draw billboard fast labels you’d have to implement a nodeModel based UI node which had access to the background preview.

Another approach is to look at this sample for zero touch nodes:

which shows writing zero touch nodes with custom rendering - you could create a Label type and when it is present in the graph it injects some geometry into the background preview - our APIs are limited though so you wouldn’t be able to inject billboard geometry this way, only lines, points, and tris.

I would look at the nodeModel node route if you want full billboard fast labels… probably interacting with this code:

It might be a challenge.

1 Like

also perhaps source will be useful as it draws custom geometry into the background preview.

1 Like