fun with designators

I am thinking of a routine to gather device numbers. Application being fire alarm devices in a large building.

How does this sound?

I want to draft and assign numbers at the same time. The routine to increment text is fairly simple. I put all of the text in a single layer to make it easy to sort, and I place the devices a logical order. But you always move something and then the order is no longer logical. You'll want to insert or delete something somewhere.

So here's a routine: Gather all the text entities in that particular layer and write the text content and the point location to an ASCII file. Read the ASCII file into a spreadsheet and sort it. Then you can see if there's any device numbers missing. And it seems like it would be pretty simple to insert a device and have a lisp routine to read the ASCII file and increment the higher text values at the locations recorded.

What I want here is opinions from people that are smarter than I am, or at least more arrogant. (Just kidding)

Would I be better served to use attributes than text entities? That is the question. I have handled text in lisp, but I would have to learn more to deal with attributes. Still, it might be worth the effort, having the attribute associated with the block......

Thankyouverymuch.

Reply to
Roy Knapp
Loading thread data ...

Arrogance here, ; }

Once you put aside the question of how you would "logically" sequence a set based solely on a set of x,y,z coordinates, I don't see why you have to take the extra step to an ASCII file. My gut tells me you could do this with lisp alone. I like attributes because they are fixed to the block and cannot be easily misplaced or mis-associated. The code to retrieve the value of an attribute is a few more lines, but once you've done it, you've done it. TOPO.LSP on my site does all kinds of stuff with attributes-you could grab some code there.

The thing I don't get immediately is how to assign "rational" names automatically. Left to right? Top to bottom? Which way first? What about numbering along a "branch"? This is the interesting part of the project to me. The rest is "clockwork".

Reply to
Michael Bulatovich

"Michael Bulatovich" wrote in news:lkwHc.48047$ snipped-for-privacy@news20.bellglobal.com:

thanks Michael.

"rational" translates to "sequential along the circuit".

I have a dozen floors of fire alarm wiring to show, sort by wire type, circuit number, device type/number, pretty much in that order. then, since these are mostly addressable loops, I want to also show the actual conduit, and where short cuts can be made to cut down path length for "return" portion of circuits.

not as difficult as I make it sound.

think this through with me, if you will. autocad is a database. a circuit is a polyline in the database. these lines could be superimposed on each other and still produce drawings, but I would know the length of each conductor. devices are blocks located at vertices along the polyline (circuit), with meaningful data stored as attributes......

just typing has been helpful, thanks. I think I am liking this.

by the way, I collect antique mantle clocks. I have a healthy respect for the talent it takes to repair such, let alone that reqired to design one.

Reply to
Roy Knapp

That's what I figured.

I haven't fooled around with polylines, but if the the points are preserved in a sequential order (you'd hope they would), you could prompt for a pick on the "bottom" of the polyline and then crawl up the list of vertices....Look for routines that manipulate polylines. You should find a chunk of code to get started.

First you would have to make a selection set of the alarms for the branch and store that. Then as you hit a pline vertex you could check that point for the insert of an alarm from the list. (You had better be good about snappin the inserts!) Then you could sequentially change the attribute number, (I'm assuming a block with attributes.) I have a routine on my site called Bseq. LSP that has some code for generating sequential att values, it's yours to mangle as you see fit. Another thought, your block might have two atts, one for the number and one for the circuit name or number. That way you could select the whole mess as long as the circuit numbers were done right, and do it in one shot. I still think you'd have to pick the plines to indicate which end to start at, unless they are always drawn from tip to tail.

I drag my wife over to the table occasionally just to explain something to her, because in the process I OFTEN come up with a new view of the problem, and sometimes the solution just jumps up and swats me in the nose.

Reply to
Michael Bulatovich

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.