Lisp to place in a polyline blocks and numbering attribute

Lisp to place in a polyline blocks and numbering attribute

pagano_edil
Explorer Explorer
925 Views
2 Replies
Message 1 of 3

Lisp to place in a polyline blocks and numbering attribute

pagano_edil
Explorer
Explorer

Hi, this is my first post, sorry for any inconvenience that may occour.

I have a polyline/arc where i need to place 9 blocks, each at the same distance(like when u use the command divide), each one of these blocks has multiple attributes, i need to number one these attributes from point a to point b as a-01 for block1, a-02 for block2, etc...

There is a way to do it? I saw the lsp made by leemac "incremental numbering suite" that allow to do something similar but u can't place multiple block in a curved polyline, you can only make a straight array.

Thanks a lot. I placed an example file to be more clear.

0 Likes
Accepted solutions (1)
926 Views
2 Replies
Replies (2)
Message 2 of 3

3wood
Advisor
Advisor
Accepted solution

You can do it following steps below:

1. Insert your block 'A', rotate and scale it properly, and fill the attribute with the first number. In your case, it is "a-01".

2. Making a dummy block 'B' containing the block 'A' inserted in Step 1 with the same insert point.

3. Use command DIVIDE to divide the path with the block 'B' in Step 2.

4. Convert the curved polyline into a line-segmented polyline with command FLATTEN.

5. EXPLODE the blocks in Step 3 to extract block 'A'. 

6. Use ALTEXT to change the number sequence with 'Along paths' option and select the polyline in Step 5.

 

ALTEXT12.gif

0 Likes
Message 3 of 3

Sea-Haven
Mentor
Mentor

This is similar to Chainage.lsp place a block at increments along a pline. There is 2 functions that control your answer Vla-getpointatdist and  (vlax-curve-getfirstderiv for the 90 angle. The increment part is very easy just add to a start number and enter attribute.

 

Will try to do something for you someone else can jump in.

 

0 Likes