Duplicate Textfields along with corresponding objects

Is it possible to duplicate a curve and text object (with a text field referring to the curve object name), so that the text field of the new text object, refers to the new curve object?

Current behaviour:
Curve A
Text Object: Curve A

↓ copy

Curve B
Text Object: Curve A

Requested behaviour:
Curve A
Text Object: Curve A

↓ copy

Curve B
Text Object: Curve B

If this is not possible, what’s a good workflow to work around this? I use object labels often and it is tedious to constantly re-select the correct object for each text field that is duplicated.

Cheers

Not currently, but I know @trav has been thinking of ways to make this possible recently. We will probably need to develop a new syntax for text fields to allow something like this.

@Benjamin3 @stevebaer I can think of a few ways to make this work, I can also see several
potential “gotcha” scenarios that would possibly make it overly complicated.

It seems to me that something like an auto object label would be the ideal workflow for this case? Meaning, let’s say that you could select geometry and the labels are generated off of some form of style template?

I’ve built a very simple grasshopper solution, with a live pipeline, ensuring any curve on a specified layer has an accompanying text label with the curve name, but it feels clumsy to use Grasshopper for such simple tasks, and doesn’t work well when collaborating on a file.

The usertext panel in v6 looks promising though!

Has there been any developments on this? Still struggling to make usertext efficient for labelling this/making draw stamps.

@benjamin I’m not sure this can easily be a part of Rhino 6 as the workflow seems pretty customized. However, with that said I took a few minutes this morning to put together a quick Rhino 6 plugin with a command called DuplicateFromNameTag which should hopefully do what you want. Here’s a video on how to use it as well. DuplicateFromNameTag.rhp (42 KB)

2 Likes

This is getting somewhere, thanks @Trav

Would it be possible for the attribute user texts to be duplicated along with the object also?

@benjamin yes absolutely. Try this version, it should be more to your liking.

DuplicateFromNameTag.rhp (42 KB)

@benjamin i have also added the source for this to the C# sample source project located here.

That’s great, and thanks for sharing the code, I will have to dig in to it later.

What is still missing is the ability to duplicate an object (with multiple user text attributes) along with its corresponding text elements (beyond just its name). See below for an example of a page and title frame, with a number of text attributes, along its corresponding text elements.

As has been documented elsewhere, title ‘blocks’ with text fields don’t really work in Rhino, and having the ability to duplicate a page and title frame, with the correctly linked text fields, would save so much time in setting up drawing sets.

@benjamin so what it sounds like you’re really after is to select a Text annotation or rhino doc object and duplicate all document objects/annotations that have some association with that selected object and update all of the associated functions that might be on those objects/annotations? wow that was a mouthful, glad I was able to type it and not have to say it out loud.

Yeah that’s it, but my only query would be need it be all document objects/annotations associated with the selected object?

Sounds like quite a complex task but I do think lots of others would find this command/workflow helpful.

Any movement on this Trav?

Not for Rhino 6. I know there are several other request for title blocks and user text in layouts so hopefully v7 sees some improvements.

I’m having a similar problem as Benjamin3

In my case it is the area I like to be referenced automatically to the new object (curve or hatch)

I attached an image to visualize the problem.

Is this possible in Rhino 7?

1 Like

@HPN

I have a grasshopper script that provides the functionality you need, listening for any curves on a specific layer and giving them a name & m2 label. The script assumes you are working in millimetres.

AREALABELS_0.1.gh (19.1 KB)

Hi Benjamin,

thank you for your quick help. That could be a solution, but at the moment not
everybody in our office is able to use Grasshopper.

An option (using Grasshopper) could be to use the new Grasshopper-Player.

  • copy “Area-Curves” and “Area-Text-Objects”
  • select “Area-Curves” and “Area-Text-Objects”
  • check if “Area-Text-Object” is inside “Area-Curve”

then

  • change GUID to the corresponding “Area-Curve” in the referenced “Area-Text-Object”

or

  • create new Text-Object and delete the old “Area-Text-Objects”

But I do not know if this possible with the Grasshopper-Player.

Best HPN

Hi @Trav ,

regarding my problem (please see my post below) I checked your C# code of the “DuplicateFromNameTag.rhp”.
And I think its close to what I am looking for. But I am not able to change it myself.

Can you please adjust this (if you have time, of course) to the following needs:

  • “Select” a bunch of Objects (Text-Blocks, Curves, Dimensions, Blocks, Hatches ,…)
  • "Copy and update all GUIDS in Text-Blocks to the new copied objects

I think it would be useful for a lot of users.
In my case it is a plan drawing with Text-Blocks which display the area of rooms.
These Text-Blocks get the area from a referenced Polyline or Hatch.
To quickly test variations of a plan layout it would be really helpful,
because it takes a lot of time to reference all Polylines/Hatches again and again.

Best HPN