Creating my own count program

Creating my own count program

Anonymous
Not applicable
323 Views
1 Reply
Message 1 of 2

Creating my own count program

Anonymous
Not applicable

Good morning everyone,

 

As a Lee-Mac fan, I'm trying to learn Visual Lisp and Auto Lisp. Did fine with the begginers' guide on http://www.afralisp and managed to tell Hello World, draw some rectangles, even doing some math. But I'm willing to go further. As I try to study, more people tell me to quit lisp and study Vb.net. They tell me it's too complicated and it'd take too long to learn.


I've been watching some computer science classes on youtube that teach lisp, but I'm having a hard time to get to learn at least enough to read someone else's code. My goal is in 2 months create something like that:


<insert command on command line, named on my c:program>

 enter

Select polylines to use boundary count

 (click on the polyline, i think it would need a ssget to get the polyline points, a 'if closed = true' or something)

 enter

 (ask me the layers (more than one) that i want blocks to be counted, clicking on objects or asking the name.

can be any block. for instance, summing all of the different blocks on these layers, even with different block definitions)

 enter

 (create a text or mtext on the center of the polyline oriented to the current ucs, asking (or not) to click on an existing text or mtext to match properties on the center of the polyline)

*each polyline would have it's own count in it's own boundary. but the counted layers can be the same. It would be good if I could select all of the polylines and they ask me just once what layer the blocks would be counted.

I've been looking for tutorials, and they're great- creating objects, drawing things, but not veryfing, counting. Is there a good online material or an affordable study material I could buy?

What would you guys suggest me to begin with? That's not the only routine I'd love to create/have.

Thanks in advance,


Eron

0 Likes
324 Views
1 Reply
Reply (1)
Message 2 of 2

Kent1Cooper
Consultant
Consultant

As a starting point, there are numerous threads on this Forum, which you can find with a Search, about finding everything inside a Polyline.  Those that involve (ssget) [typically with the WP selection method to follow the Polyline vertices] can easily have Layer and/or Insert-object and/or Block-name filtering incorporated -- very likely some already do.  If you're capable enough to combine elements from different routines, there are also numerous threads about placing Text [or Mtext] in a Polyline [typically at its centroid, or wherever else you pick if that's what you want] based on various kinds of information [such as to label the Polyline's area] from which you can get Text placement elements.  And there are threads about counting Blocks, from which you can get Text content elements.  Be aware of the fact that Polylines with arc segments can return incorrect results if you just trace around the vertices for a window-polygon outline [which will be straight-edges all around], and if that's a possibility for you, of the compensations suggested in some of those find-everything-inside threads.

Kent Cooper, AIA
0 Likes