
Registered forum members do not see this ad.
excuse me, i've just to understand the meaning of boundaries. Indeed, the boundary is on the same layer but don't have to be extract.
I've tried the code. It work perfectly. with your code CONNECTEDTO, I obtain all I need. I removed the X and the Y. keeping only name of pullbox (start and end) and length
I made some processing and obtain a 3 rows excel table
And i succeed to upolad the length in my original table with VLOOKUP
but unfortunately, after many try, I don't succed to transform CONNECTEDTO to make able the export to excel.

Not really. Not for my final table, but It would be usefull to check data later.
Annexe 6 corrigée controlée CAGC .xls
here is my final table. The row "G" have to be completed.
I'm developping à VBA macro to complete it with different source files. (the extract xhixh is our subject, is one of them)
Alrighty then, i'll look into it later.

No problem
Okay, now answer me this, if its not the same for every drawing, how would the program diffrentiate which polyllnes to process? preferably the conduits resides on its own unique layer, that will reduce the number of items to process. we could however use a wildcard "RAB_F*" for conduits layersI saw your code is attached to RAB_F09097040411, but this name will change for every dwg we'll have to process.
What about the Pull box blocks, do they differ on every drawing as well? or a least have the same TAG name <"CH_COD1"> for the value attributes?
EDIT: In the end what you really need is the length of the polylines connected to a pull box data. and not the pull boxes Start/Endpoint, as the ConnectedTo rouitne already shows what pull boxes are associated with a particular conduit, is that correct? I believe you only need that info before to compare the coordinates with the collected plines coordinates.

Here is some others dwg to test your code.
F04364230311_75113_240311.dwgsF12707110411_75113_120411.dwg?F12187110411_75113_110411.dwg
F62884220711_75113_220711.dwg F37510300511_75113_300511.dwg
the layers where there are polylines begin with RA : "RAA, RAB, RAC, ..."
they always have the tag name <"CH_COD1">
yes exactly. the coordinates of the pullbox and the plines are not usefull for me. It's just transition data which can help me to put <"CH_COD1"> and length together.
CODE UPDATE:
Write to CSV file with this format
IT will still scroll thru the screen and launch explorer with the file highlightedCode:Format in Notepad 14214,9.693995455208048,14213 14217,10.6469506871911,14221 Format in Excel 14214 9.693995455208048 14213 14217 10.6469506871911 14221
There are still polyliens connected to jsut one pullbox. You will recognize it when you open the CSV file
HTHCode:22211 1.344204292 14214 9.693995455 14213
Last edited by pBe; 8th Jun 2012 at 11:08 am.

Registered forum members do not see this ad.
Thank you.
It works perfectly
Bookmarks