Request for Modifications on an Existing Lisp to Label Plant Blocks

Request for Modifications on an Existing Lisp to Label Plant Blocks

Anonymous
Not applicable
2,880 Views
21 Replies
Message 1 of 22

Request for Modifications on an Existing Lisp to Label Plant Blocks

Anonymous
Not applicable

Hi fellow CAD Friends,

 

I am in search of a Lisp Routine for labelling plant material in a Landscape Plan which is a regular work flow at my current job. On a typical project we have to label anywhere between 1000-5000 plants some times as groups or as individual plants.

 

My crude logic (I guess) would be: the user will preselect a Layer, Multi-leader Style and Text Style in the working drawing.

Run the Lisp: LabelBlock (LB), AssignBlockLabel (ABL) - LISP Routine Initiation command - or some thing of the Programmers Choice..

Select the Block to label

Ask User input for Plant Key : A or BB or d or cc - changes in different drawings for different plant material

Selection Window the blocks you want to label at a time - Selection can be more than one type of blocks, but the program should only count the user selected block initially.

Count the number of the 'user specified block type' inside the selected window

Program should ask the user for insertion point (the Arrow Point) of multileader)

Then the multileader will have text contents as : eg: 3-A or 5-BB or 7-d or 345-cc depending on the number of blocks selected by user. The most important point here is the Plant Key format in multileader - should be (number, hyphen, plant-key alphabet) without any spaces. This will enable us to do the check and verification for tallying number of plant blocks and number of plant labels in the drawings using Find Command.

 

I found this great lisp as a starting point - Programmed by Mike- (Thank you!!!  Mike). This lisp  is awesome. Thanks for the effort you put in helping the community. Really appreciate your good work. This lisp can be found here:

 

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/count-objects-and-edit-existing-text...

 

I don't know much about lisp other than the  working knowledge of using it. In this Lisp, Is there a way to give a key to the text in multileader rather than returning the entire block name in the label? So if I run this lisp it will start as intended, select the block, The lisp should ask for Block Key - (user inputs could be A or BB or a or xx or any text), window the blocks I want to count, then use the current Multi-leader style selected, insert the Multi-leader in the current layer,  and the text should read 10-A or 12-BB or 6-a or 4-xx, where these numbers are the actual blocks selected. The key here is adding a hyphen and the 'User input alphabet' with out any spaces. I don't know if we add the plant key  as an attribute to the block (when the block is inserted into the current drawing), whether the lisp can automate the process taking that info while inserting the text ( number, hyphen, plant-key (from attribute info inside block definition) format).

 

This will be great help if you can do this for me.

 

Thanks in advance.

 

VM

0 Likes
Accepted solutions (1)
2,881 Views
21 Replies
Replies (21)
Message 21 of 22

Anonymous
Not applicable

Hi Pbejse,

 

I am so excited to let you know and thank you personally for getting this work. This is exactly I was looking for and you exceeded the expectations by few special checks. The lisp will not let you select a different block than the one the user originally selected, at the time of label placement. This is a very valuable check preventing user from labelling a wrong block.

 

Thank you once again for all the patience and regards for taking my suggestions/ requests. You did an awesome job.

 

I will keep testing the lisp with a few of my colleagues and let you know if there are any concerns / comments.

 

As of now, This works wonderful.

 

Thanks and regards,

 

VM 

0 Likes
Message 22 of 22

pbejse
Mentor
Mentor

@Anonymous wrote:

I am so excited to let you know and thank you personally for getting this work......

 

Thanks and regards,

 

VM 


You are welcome Vince,  Tell me how it goes

 

Cheers

 

 

 

0 Likes