AvisRara Posted March 5, 2012 Posted March 5, 2012 Hi, guys, I hope this is the right section to post my question. As I'm lisp ignorant, I'd like to ask if someone could help me write a lisp routine that can label a tree canopy, which is basically a simple 2d circle. All I want to be able to do is to select the circle and the routine to label the circle with a leader and the text "Can: /diameter of the circle/". Can anyone give a hand? Thanks Quote
ReMark Posted March 5, 2012 Posted March 5, 2012 Why not use an attributed block for the tree canopy symbol? Quote
SLW210 Posted March 5, 2012 Posted March 5, 2012 Moved to the AutoLISP, Visual LISP & DCL forum. Quote
BIGAL Posted March 6, 2012 Posted March 6, 2012 Atributed block and a field, The field would read the scale factor = size of tree auto display and update etc Quote
alanjt Posted March 6, 2012 Posted March 6, 2012 Atributed block and a field, The field would read the scale factor = size of tree auto display and update etc Fields weren't around in 2002. Quote
AvisRara Posted March 6, 2012 Author Posted March 6, 2012 Hi, gus, and thanks to all who replied. The problem is that the trees have already been imported as attributed blocks with three attributes: number, elevation and code description, the last containing the canopy size. However, what I want to do is to have a lisp that can draw the circle with a centre the insertion point of the three and a radius the radius of the description code. Then I need to have that circle labelled with a leader pointing to the circle and text saying, for example, "Can: 4.00m". What I'm diong now is to export the X,Y of the insertion points of the blocks, then write a script to draw circles with centres the X,Y of the insertion points, and radii taken from the code, and then run the script. So far so good, but when it comes to labelling I do it manually by copying, pasting and editing the text. That's why I just wondered if there could be done a lisp which will draw the circle and label it. I guess it's not that simple as I thought... Quote
ScribbleJ Posted March 6, 2012 Posted March 6, 2012 Is it possible for you to use you're script to insert a dynamic block with the circle being dynamic and an attribute that is associated to the radius of the circle by using the Object radius in the field? To better explain what I mean by that refer to the following link for an example. Bear in mind that the example is not exactly what you are needing but hopefully it will help point you in the right direction. Click that >>> The Lazy Drafter Quote
SLW210 Posted March 6, 2012 Posted March 6, 2012 Is it possible for you to use you're script to insert a dynamic block with the circle being dynamic and an attribute that is associated to the radius of the circle by using the Object radius in the field? Fields weren't around in 2002. No dynamic blocks in 2002. Quote
ScribbleJ Posted March 6, 2012 Posted March 6, 2012 No dynamic blocks in 2002. Right. Maybe I should refrain from responding when I have a headache. Quote
BIGAL Posted March 8, 2012 Posted March 8, 2012 Search here for attribute edit using tags .lsp pretty sure Lee mac has posted a couple of simple ones based on serach and replace an attribute will have a look to. Ok look at the code and it will get a block name you can also get Insertionpoint you then add to code to draw a Circle at insertion point with radius =attribute value this is trunk done the leader is then continuing on with some simple lsp polar to add lines and text other labels etc. Quote
Recommended Posts
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.