Total length from block reference

Total length from block reference

p.suderNDHYL
Participant Participant
3,419 Views
21 Replies
Message 1 of 22

Total length from block reference

p.suderNDHYL
Participant
Participant

Hi there.
First, coding is a black magic to me 😅
I'm using Lee Mac's (whose LISPs made my work way better, for what I'm forever grateful!) Length & Area Field program to display the total lenght of polylines, but I was wondering if it's possible to also get the length of polylines from within a block reference.
We have a custom program that creates block references with double meander pattern and also spits out the total lenght. We keep track of length of all other polylines via LFM and manually add the total lengh of those in block references. It would make our lives way easier to just select block references and polylines drawn by hand, run the LISP and get total length in one.
We can't explode the block references, because they contain data required for production robot.

psuderNDHYL_0-1711017812995.png

 

(In this example I need a total length of selected block and also those pink polylines)

 

I don't even know if it's doable or just a fool's errand to get the properties of objects within a block.

Thanks in advance!

0 Likes
Accepted solutions (1)
3,420 Views
21 Replies
Replies (21)
Message 21 of 22

pbejse
Mentor
Mentor

@p.suderNDHYL wrote:

 instead of changing them, it creates new entities with the same name. The field text doesn't see them anymore and returns ##### after regenerating... This is something I was afraid that could happen, but was hoping it wouldn't


Yup, that will definitely happen.

 


@p.suderNDHYL wrote:

We'll just end up selecting everything from a group that had changed block and placing a new field, which is still better than manually adding everything on a calculator. I'm not allowed to share the program itself for inspection 😅

Thanks again for taking your time and helping me 🙂


Good for you, Glad I could help

 

0 Likes
Message 22 of 22

p.suderNDHYL
Participant
Participant

Hi @pbejse , I just noticed the program you wrote, returns a text object. Is it possible to make it an mtext, so a mask could be applied to it later?

0 Likes