Insert Attribute in Polylines or Lines

Insert Attribute in Polylines or Lines

andre_andreoni
Explorer Explorer
773 Views
8 Replies
Message 1 of 9

Insert Attribute in Polylines or Lines

andre_andreoni
Explorer
Explorer

I have a project with copper pipelines of different diameters, however I would not like to create several layers with different diameters to filter layers with the same characteristics. What I believe to be more practical, is to create an attribute in polylines or lines, where I can insert the respective diameter of each tube into the properties, and therefore make a filter per attribute (I do it with lisp), and count the linear meters of each diameter (I can use another lisp that I have). Is there any lisp or command to insert attributes into polylines or lines to put a numeric value?

 

0 Likes
774 Views
8 Replies
Replies (8)
Message 2 of 9

Kent1Cooper
Consultant
Consultant

If they're Polylines, just give them global widths corresponding to the pipe diameters.  An AutoLisp routine could easily find all Polylines of each width, and report their total lengths.

Kent Cooper, AIA
Message 3 of 9

andre_andreoni
Explorer
Explorer

I know this sollution, but the problem is, when you need to print the drawing the thickness will be impresseed. But thank you so much.

0 Likes
Message 4 of 9

dbroad
Mentor
Mentor

You can add xdata.

Architect, Registered NC, VA, SC, & GA.
Message 5 of 9

ec-cad
Collaborator
Collaborator

How about inserting a little 'block' with maybe a small triangle made of lines, and add attributes to that block,

making them 'invisible'. If the Diameter / Length are the same, you can 'copy' those blocks, once you fill

in the details. You will be able to 'see' those added blocks, so you know which pipes are identified.

Then later, you can get a selection set of that 'blockname', grab the attribute values, and

report as needed.

 

ECCAD

Message 6 of 9

CADaSchtroumpf
Advisor
Advisor

You can try this.
This uses Xdata as well as ldata.
in the code you can personalize/complete the dn table (at the start of the code) while respecting the formatting (see the commented description at the start of the code)

After using the code you can query the polyline with (commented at the end of the code) to obtain the information:

(mapcar
	'(lambda (x ent / ent)
		(vlax-ldata-get (vlax-ename->vla-object ent) x)
	)
	'("1" "2" "3" "4" "5" "6")
	(list (setq ent (car (entsel))) ent ent ent ent ent)
)

A selection of the objects concerned by the application is possible with:

(sssetfirst nil (ssget '((0 . "LWPOLYLINE") (-3 ("PIPELINE")))))
Message 7 of 9

АлексЮстасу
Advisor
Advisor

Hi, @andre_andreoni 

 

You can use free XDTOOLS to work with attributes (descriptive data, characteristics) of objects in XData:
- XDTOOLS_MDEFINE - create and edit XData definitions.
- XDTOOLS_ADD - add the required XData to all specified objects.
- XDTOOLS_VEDIT - view and edit XData contents.
- XDTOOLS_SELVALUES - selecting by desired XData field values.
Etc. - 20 commands.


If you need to make inscriptions from XData field values - XDLABEL.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 8 of 9

baksconstructor
Advocate
Advocate

 

Most likely this is what is needed - MyPropertiesCAD 

 

Message 9 of 9

Sea-Haven
Mentor
Mentor

This worked for me I drew plines with a width of 0.025 ie 25mm pipe it drew a single skinny line, looked like a single line in the pdf. The advantage is get length and width * 1000 etc. Maybe its my Bricscad. Did not test very much.

 

Fat line is 5 others are 0.025 & 0.016

SeaHaven_0-1727418801561.png

 

 

0 Likes