Jump to content

Recommended Posts

Posted

Hello,

I have found a many great lisp that has been created from people of the AutoCAD forum. I was hoping someone can guide me to changing maybe one of the lisp to my particular task.

 

I am not familiar with creating or changing lisp so I hope someone can help. I would try and modify it myself with trial and error. To some extent It has worked but only for the modifying the table size. So now I'm really stuck.

 

I have found two lisp routines, the first one is BCPL. However the BCPL does not recognize my points as blocks. I have created blocks that the lisp routine does recognize but I wish It just recognized objects names, specific layers, or colors.

It Is Still A Great Lisp! I like how it generates a table after you select the enclosed Polyline and gives you a quantity.

 

The second one is SELECTCONTAINEDINSERTS. 

The second lisp SELECTCONTAINEDINSERTS does almost the same. It counts the blocks or objects in a enclosed Polyline, but gives you the list and counts on the command menu. I really like how it I create a Polyline, select it, and gives me a count.

 

What I'm trying to do is this-

I have Inserted Points using the MAPIMPORT from a .CSV File. So now the reference Points come out as "Map_Survey_Points" objects.

 

I would like the new lisp to count the object "Map_Survey_Points" inside a specific Polyline. I would Like to create different Polylines with different colors and have the table reflect it in the table as background fill (Demonstration shown in the DWG) as part of the lisp command. The table would depend on the Polyline created. 

 

I would really like to Use SELECTCONTAINEDINSERTS as the base for the new lisp (if someone can help). (I'm hoping this lisp would be easier to modify)

 

The second request would be for the lisp routine to have that same table update the counts if the selected polyline is changed. So as I change the Polyline it would't just keep making a new table but rather have a set table (after inserting the table at the initial command) were the Count Column of the block can change based on the Polyline. (The Table would depend on the initial Polyline selected) So for example if I move a vertex or stretch the Polyline and use the command "REGEN" or "REGENALL" the table Count Column would update with the new count of a specific object( in my case Map_Survey_Points) inside the Polyline

 

My biggest Idea for modification is for the routines is to have an option to only pick specific blocks or objects based on Block Name or Layer, using a Polyline as a boundary, and generate a table with the quantity. And for the table to update the count if the polyline is modified

 

Would This be possible?

Am I Asking the impossible?

Where can I Go?

I know this is a huge request, but thank you for anyone that is willing to help.

 

Any Help, Guidance, Ideas are very Appreciated

 

 

Best, JE

Posted

This is very quick example you can remove the filter about text and it will find all objects then do a what is object or use a filter that you want. Replace Plent with a selection set item when repeating for multiple plines.

 


(setq plent (entsel "pick pline"))
(if plent (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent))))))
(setq ss (ssget "WP" co-ord (list (cons 0 "Text,Mtext"))))

(alert (stract "you have " (rtos (sslength ss) 2 0)) " Items"))

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...