Jump to content

Recommended Posts

Posted

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

Posted

Why not use an attributed block for the tree canopy symbol?

Posted

Atributed block and a field, The field would read the scale factor = size of tree auto display and update etc

Posted
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.

Posted

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...

Posted

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

Posted
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.

Posted
No dynamic blocks in 2002.

 

 

Right. Maybe I should refrain from responding when I have a headache. :oops:

Posted

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.

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...