naming closed polylines and count

naming closed polylines and count

cizimcenter
Participant Participant
2,164 Views
31 Replies
Message 1 of 32

naming closed polylines and count

cizimcenter
Participant
Participant

I am working on curtainwall manufacturing drawing task in which I need to give unique number and need to make table with layer, width, length and count of each glass panel. Then i need to write names into each polylines center as a installation scheme.
But is it possible to add number with prefix and/or suffix (for example GL1-1,GL1-2,GL1-3) Automatically instead of just 1, 2, 3 ,4..... type number? A sample file is attached.
Can you please help with this? 

0 Likes
Accepted solutions (1)
2,165 Views
31 Replies
Replies (31)
Message 2 of 32

Brock_Olly
Collaborator
Collaborator

Hey! Looks like we have the same job 🙂

Do you already have a LISP to generate the table on the right, or did you fill that out manually? 

Message 3 of 32

cizimcenter
Participant
Participant

i did it manually and takes too much time. that's why i need to automate.

0 Likes
Message 4 of 32

-didier-
Advisor
Advisor

Bonjour @cizimcenter 

 

There are several possibilities to do this.
I’ll start with the simplest one.
Would you agree to use a dynamic block to make this kind of drawing?
If so, it will be possible to add attributes and extract them to a table.
If you do not agree with this method, I will think about something else.

 

2025-04-10_12-46-59.gif

Amicalement

Éternel débutant.. my site for learning : Programmer dans AutoCAD

DA

EESignature

Message 5 of 32

cizimcenter
Participant
Participant

Bonjour @-didier- 

clients usually send drawings as polylines. they convert 3d to 2d drawings from rhino or revit. if possible, i prefer a solution using poylines.

0 Likes
Message 6 of 32

-didier-
Advisor
Advisor

Bonjour @cizimcenter 

 

Of course! If you don’t say all this complicates the thing to help you.
How could I know that you are not the author of these polylines?
OK, I will think of something that starts from these polylines as starting hypothesis.
We stay in touch.

 

Amicalement

Éternel débutant.. my site for learning : Programmer dans AutoCAD

DA

EESignature

Message 7 of 32

Sea-Haven
Mentor
Mentor

A couple of ideas you need to make a list of each rectang,  length & height & entityname, can then sort the list, then label the rectang, add the label to a new list. Do a count on the new list and draw a table.

 

Ok next option copy the rectangs to seperate objects do dims of the objects as seen on bottom of dwg.

 

Next step is send  to Excel ? Can do as part of make table or I have send a table to excel.

 

Thats a few steps, not a 5 minute job.

 

I dont know if you have seen this movie.

 

Added to my to do list it is getting bigger.

 

Have you considered getting a programmer on board ? There are many here who do customer work, yes you will need to pay. But you would provide a list of tasks including this one. Time savings can be immense a task manually around 3 hours now its 2 minutes.

Message 8 of 32

-didier-
Advisor
Advisor

Bonjour @cizimcenter 

 

Currently, I am at this solution, it is not finished, but I propose it before creating the table.
I take as reference the surface to associate the identical windows, therefore I do not draw in the same position the texts as your example, which is based on the starting point lower left.
Is it okay with you, or do I have to think again?

 

Amicalement

 

2025-04-11_18-50-33.gif

Éternel débutant.. my site for learning : Programmer dans AutoCAD

DA

EESignature

Message 9 of 32

Sea-Haven
Mentor
Mentor

Code looks good @-didier- just a comment would the lower left panel be Gl-100 as a starting label not GL-101 ? I have a rotate pline vertices to lower left if you need it. Neede for another project. Can help in the sorting process.by lower left.

 

Attached send a Table to Excel your welcome to use it.

Message 10 of 32

baksconstructor
Advocate
Advocate

@cizimcenter wrote:

I am working on curtainwall manufacturing drawing task in which I need to give unique number and need to make table with layer, width, length and count of each glass panel. Then i need to write names into each polylines center as a installation scheme.
But is it possible to add number with prefix and/or suffix (for example GL1-1,GL1-2,GL1-3) Automatically instead of just 1, 2, 3 ,4..... type number? A sample file is attached.
Can you please help with this? 


This AutoCAD add-on will solve your problem.
Here - MyPropertiesCAD 
I remind the administrator - this is user assistance on the forum.

 

myprop.png

After which you can create a table of all objects.

 

After a while I will try to give a bigger example.

0 Likes
Message 11 of 32

cizimcenter
Participant
Participant

Hi @-didier- 

it is OK. Names can be at the geometric centers of the polylines. naming from lower left is not compulsory. If would, it will be better.

0 Likes
Message 12 of 32

-didier-
Advisor
Advisor

Bonjour @cizimcenter 

 

I think good news should come soon.
I managed to increment from the bottom left.
I copied several times a few windows to check if the identical windows had the same label.
For me, it is OK, and You ?.
I will continue to process the table.

 

Amicalement

 

2025-04-12_17-42-32.gif

Éternel débutant.. my site for learning : Programmer dans AutoCAD

DA

EESignature

Message 13 of 32

cizimcenter
Participant
Participant

Hi @-didier- 

it works perfectly. That's what i need. thanks.

0 Likes
Message 14 of 32

mohammedhussain.noyadaKS7M4
Explorer
Explorer

Hello @cizimcenter,

I developed the command. Attaching the video for your reference.

Message 15 of 32

cizimcenter
Participant
Participant

@mohammedhussain.noyadaKS7M4 

can you share the lisp file also?

0 Likes
Message 16 of 32

-didier-
Advisor
Advisor

Bonjour @cizimcenter 

 

I prefer to separate into different commands.
So the next one will be like this :

I work slowly because I do many other things at the same time.
When everything is effective, I will deliver the code.
Then we can make comparisons, because I’m glad to see that other members are interested in your question.
All ideas are good to take.

 

2025-04-14_11-37-20.gif

Amicalement

Éternel débutant.. my site for learning : Programmer dans AutoCAD

DA

EESignature

Message 17 of 32

Sea-Haven
Mentor
Mentor

@mohammedhussain.noyadaKS7M4 you can set the width of the columns of a table, no need to pick and stretch. Same with start at settextheight for table.

 

(vla-setcolumnwidth objtable 0 17) ; column 0 width

 

0 Likes
Message 18 of 32

-didier-
Advisor
Advisor

Bonjour @cizimcenter 

 

As I said, I’m not quick to answer because I do several things.
This is my current version.
I rely on the end of the application, but I just realized that I have not treated well the lengths and widths. I will do it again.
I preferred to make three commands, it allows you to cut the phases. That’s my point of view.
If you prefer a single, complete action, it can be done without much effort.


By choosing to filter on surfaces to detect identical windows, I realize a limit, if two different windows have the same area

the program will create only one reference. I’ll work on that.

 

Amicalement

 

 

 

Éternel débutant.. my site for learning : Programmer dans AutoCAD

DA

EESignature

Message 19 of 32

ec-cad
Collaborator
Collaborator

Suggest making a list of object / handle.

ECCAD

0 Likes
Message 20 of 32

cizimcenter
Participant
Participant

Hi @-didier- 

the current version is OK. no problem, better late than never.

and three commands may be more useful. 

best wishes

0 Likes