old lisp does not work now

old lisp does not work now

dani_cs
Advocate Advocate
834 Views
14 Replies
Message 1 of 15

old lisp does not work now

dani_cs
Advocate
Advocate

Hi all,

 

I used a wonderfull lisp too long ago. Ýesterday, I needed to use it, but I was receiving an error. The lisp is for creating automatic layouts. Steps are these:

 1. I have an attribute block which represents the size of viewport in layout according to plan scale (I have to scale that block in X and Y for that)

 2. I align that blocks to the axis of the road (for example, 30 blocks in total). Axis road is in layer "0" for example.

 3. Then, I configure the first viewport plot config and I go to model space again and I execute demo.lsp.

 4. Finally, it would appears 30 layouts according to the numbers of block, witch UCS align.

 

but it is not working now and I do not find the error. Maybe I forgot some step.

I am attaching the lisp and block.

 

Thanks all!

0 Likes
835 Views
14 Replies
Replies (14)
Message 2 of 15

johnyDFFXO
Advocate
Advocate

The block name needs to be SHEET

 

johnyDFFXO_1-1718186832330.png

 

 

0 Likes
Message 3 of 15

Moshe-A
Mentor
Mentor

@dani_cs hi,

 

it's not working cause you are not using the correct block (sheet - with the expected attributes)

also this lisp does not support dynamic blocks.

 

Moshe

 

 

0 Likes
Message 4 of 15

dani_cs
Advocate
Advocate

@Moshe-A @johnyDFFXO 

 

Thanks for your response.

 

It is possible that I changed block name. So, I renamed it to "SHEET" and it is still not working. I am attaching a dwg sample and the lisp I use for align the bock with increment attributes. I saw that the new blocks created are anonymous. Could be it the problem?

0 Likes
Message 5 of 15

pendean
Community Legend
Community Legend

@dani_cs wrote:

@Moshe-A @johnyDFFXO 

 

Thanks for your response.

 

It is possible that I changed block name. So, I renamed it to "SHEET" and it is still not working. I am attaching a dwg sample and the lisp I use for align the bock with increment attributes. I saw that the new blocks created are anonymous. Could be it the problem?


Well... your LISP seems to be looking for an ATTRIBUTE called NUMBER, which does not exist

pendean_0-1718204010933.png

 

So...

0 Likes
Message 6 of 15

Moshe-A
Mentor
Mentor

@dani_cs ,

 

Attach is your lisp modified to support "Num-hoja" as attribute for layout name.

be aware that you must use VG as your block name.

 

enjoy

Moshe

 

 

0 Likes
Message 7 of 15

dani_cs
Advocate
Advocate

Hello @Moshe-A 

 

thanks for replying.

 

I tried the lisp but it is not still working. I think it could be the anonymous block created with the other lisp I attached. I copied the first block called "VG", then I changed the number of attributes to "02" and executed your demo.lsp version. Just only the 2 layout was created but not exactly how it must be.

 

I am attaching the second test drawing.

Thanks in advance.

0 Likes
Message 8 of 15

Moshe-A
Mentor
Mentor

@dani_cs ,

 

Yes you are right, the blocks from 03 are product of another application (lisp)

it is better you replace them to be VG.

 

Moshe

 

 

0 Likes
Message 9 of 15

dani_cs
Advocate
Advocate

Hello @Moshe-A 

 

Yes, I use a lisp to align the block to the road axis, while the attributes of block "VG" are incremented. But, I do not know why it makes anonymous block. In the past, the blocks created by that lisp were "VG" too.

 

I am attaching that lisp called "pagbloc2"

 

Thanks in advance.

0 Likes
Message 10 of 15

Moshe-A
Mentor
Mentor

@dani_cs ,

 

The lisp is perfectly ok. if at "Select block: " you pick anonymous block, the outcome is exactly what you got.

 

Moshe

 

0 Likes
Message 11 of 15

dani_cs
Advocate
Advocate

Hello @Moshe-A 

 

But "VG" is not actually an anonymous block, isn't it? So, why does the lisp create anonymous block?

0 Likes
Message 12 of 15

Moshe-A
Mentor
Mentor

looks like you did not read this:-

"if at "Select block: " you pick anonymous block, the outcome is exactly what you got."

but you can easy fix this, just delete all the blocks put again the first one, make sure it is VG and run your lisp

 

 

 

 

0 Likes
Message 13 of 15

dani_cs
Advocate
Advocate

Hello @Moshe-A 

 

Yes, I read it, but I think I did not explain very well.

 

The first block is already "VG". I use "pagbloc2" lisp to copy and align "VG" blocks while incrementing attributes. But the problem is that all new blocks are anonymous although the seed (I mean first block) is "VG". You can try. 

0 Likes
Message 14 of 15

Moshe-A
Mentor
Mentor

yes did try it and all the blocks came out VG

0 Likes
Message 15 of 15

dani_cs
Advocate
Advocate

@Moshe-A Really?

 

I do not know what the problem is then....

0 Likes