Leader with object name

I realized that I’ve been typing object names manually all this time and finally came to the conclusion that this has to be easily solvable with a script (and ideally it should be a native Rhino function). This is exactly what I needed, thanks, Dale.

I also wanted this and turns out the solution is extremely simple. In the Python script, change line 64 from this:

    cmd = '_-Leader {} _Pause _Enter \"{}\"'.format(point, text)

to this:

    cmd = '_-Leader {} _Multipause \"{}\"'.format(point, text)

This way the command waits for additional points and only when you’re done, you confirm it, just like in regular Leader command.

3 Likes

I didn’t know of multipause. That is very useful.

In my Rhino world I use Object Name to number parts for CNC or laser assemblies. (Is there a better way?) I like them because they stay with the geometry when I export the STP file and I can use them with a leader in drawings, so they are important for organizing and explaining things. Also object name metadata is easy to access in GH with the R8 components, where I can set up accurate balloon labels quickly for whole batches of parts in exploded views. It’s less smooth getting them onto the layout, but overall Leader + Object Name is a useful combination for me in layout space so I vote in favor of any integrated streamlining :slightly_smiling_face:

Dale, thanks a lot for your script! I was also looking for this functionality. But for me it only works in layout view. do you have a clue why that might be? On the screenshots here it seems it has been also used for model view.
Thanks a lot!

Sadly I can’t share one of my drawings to show you, but imagine the following image but with object tags instead of numbers with twice or three times the amount of callouts on each of three to seven pages of details.

There is a lot of assembling and welding to do in a steel ship.

Can we have a DimArea version named DimName that instead of capturing the Area captures the Block/Object Name? Please :)?

I even tested, used DimArea and changed %<Area to %<ObjectName in the leader and it worked like a charm.

DimName would be very very useful and we could also have DimProp where it asks the user which property the user wants called and it just updates the %<Property inside the leader :smiley:

We could have it on next service release of rhino 8, what do you think? haha

Edit1. Found a better example on google images

If I could combine fx Properties in the same command would be more awesome than ever.

The problem is that there are a bunch of scripts but I found none that worked seamlessly in paper space like the simple leader calling works (and DimArea)

Hi Altamiro -

That is RH-84789 Annotation: Object Name Request

In which way doesn’t the “LeaderObjectName.py” script that Dale posted work for you?
-wim

It wasn’t letting me select the object without activating the detail view and the leader was ending up on model space origin instead of paper space where I placed, but I found out there was another empty detail over the detail I was working on, now it seems to be working fine.

The multipause edit also worked fine and I was able to find the orientation of how to turn the script into an Alias, everything working fine now.

There are so many useful commands hidden as little scripts on discourse, between this and all Pascal scripts, we could use a compilation on food4Rhino for all this.

Rhino’s Wild Lab would be a good name for such script compilation in plugin form :stuck_out_tongue:

Edit1. Is it possible to activate history for when the detail is moved the leader follow like the regular leader?

Hi Altamiro -

I see there’s something up with leaders that are made with the regular DimArea command. I’ve put this on the list as RH-86618 History: DimArea Leader on Layout
I have no idea if fixing that will also automatically make it so that the one created by Dale’s script will follow along…
-wim

1 Like

I’ve been using the script the whole day to finish my work here and I just got the following warning when saving stuff to close for the day.

Maybe the save from 9 to 8 is not the problem with the DimArea and Leader problem, maybe it is something specific with Rhino 8. cause I am using 8 and saving as 8.

SystemInfo.txt (2.9 KB)

RH-86618 is fixed in Rhino 8 Service Release 19

1 Like

Wonderful script. How I can make this script to strip the name and use only the number from the beginning of the name? All my parts are named “1. Test part”, “2. Better model”, “3. Left side”, etc. Basically I do need the Leader to write only the “1”, “2”, “3” from the name of the object. I do need only the number at the beginning of the name because the full name of the part will be included in the BOM.

This way I can obtain quicker something like this desire result also posted above:

This is great, but would be a game changer if this worked on section drawings and layout details too. And as “Altamiro A J” suggests, a DimProp or similar would be great. For me, linking material name would be a huge help.

That would be a big step toward semi automated annotation for sections and elevations, the holy grail, we’re getting closer and I’m very excited to see come together, thanks guys!

1 Like

This cannot move along with the object’s translation position. Sometimes the model shrinks or shifts, can it be optimized to have the function of recording historical positions