LISP request for advanced find from a list

LISP request for advanced find from a list

smallƑish
Advocate Advocate
2,947 Views
48 Replies
Message 1 of 49

LISP request for advanced find from a list

smallƑish
Advocate
Advocate

I have a list in a notepad file 

the same data included in a dwg file as a block attribute

Just needed to find the att with the effect of  the find command 

sample files attached  attached 

 

purpose  of the process is; (nothing to do with code, just for understanding )

1. make sure I didn't miss any att

2. location of the block is an in correct room 

0 Likes
2,948 Views
48 Replies
Replies (48)
Message 2 of 49

paullimapa
Mentor
Mentor

What happens when you run the Find command 

Are the results not what you expected 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 49

smallƑish
Advocate
Advocate

"Find" is working properly, but if there is a bulk quantity, it's a ton of time-consuming. 

0 Likes
Message 4 of 49

paullimapa
Mentor
Mentor

doesn't matter if there's a bulk and with code it'll fly by the find process.

so where's the code?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 49

smallƑish
Advocate
Advocate
i don't have any code 😞
0 Likes
Message 6 of 49

paullimapa
Mentor
Mentor

So explain clearly what happens when a match is found


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 7 of 49

smallƑish
Advocate
Advocate

What I imagine is, When the code runs, let it find the first line data from the notepad, and find the match att block. Then press any key (TAB) let it jump to second line and pan to the particular att match in the dwg. Similarly till end of the line from notepad. 

0 Likes
Message 8 of 49

smallƑish
Advocate
Advocate

If copy paste from Note pad data to DWG, as text or Mtext also preferable, if it may difficult to connect with Notepad file.

0 Likes
Message 9 of 49

paullimapa
Mentor
Mentor
Accepted solution

Try FnAtV.lsp attached.

It doesn't allow you to TAB but at least you can choose from options at the command line as to how to respond when matching items are found.

Note the following settings that can be modified to your requirements at the beginning of the code:

 

 

 (setq blknam "-EP-LEEDER-1" ; block name
       lyrnam "Verified"     ; layer name 
       lyrcol "3"            ; layer color
       tagnam "CIRCUIT"      ; attribute tag name
       zmfac  ".2x"          ; zoom away from object factor
 )

 

 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 10 of 49

smallƑish
Advocate
Advocate

OMG it's working with a lot of advanced features. Thank you so much. It's a TON time saver. 

0 Likes
Message 11 of 49

paullimapa
Mentor
Mentor

glad to have helped...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 12 of 49

smallƑish
Advocate
Advocate

if possible can you just add  verified and unverified  buttons here also? 

When we found duplicate blocks.

 

smallish_0-1707548344109.png

 

0 Likes
Message 13 of 49

paullimapa
Mentor
Mentor

ok, try this modified version.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 14 of 49

smallƑish
Advocate
Advocate

I apologise,My mistake, I have made a wrong post and edited Message 12. 

0 Likes
Message 15 of 49

paullimapa
Mentor
Mentor

So not Verifiedall but just Verified which applies to the current highlighted item?

Clicking Next or Previous is the same as Unverified right?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 16 of 49

smallƑish
Advocate
Advocate

My request is having all 4 options,

1. Next / previous 

2. Exit

3. Verified 

4. Unverified 

So we can compare previous and next, then verify the correct one/multiple, and move on. 

0 Likes
Message 17 of 49

paullimapa
Mentor
Mentor

4 options are:

Next - won’t show on last item

Previous - won’t show on first item

Verified - this option changes highlighted item’s layer 

Exit - this option exits out of reviewing the current matching set 

What does Unverified do?

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 18 of 49

smallƑish
Advocate
Advocate

True, sometimes I do overthinking 😭

0 Likes
Message 19 of 49

paullimapa
Mentor
Mentor
Accepted solution

try this version


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 20 of 49

smallƑish
Advocate
Advocate

Yes. Yes 

This version 100% suite with the requirements

It's hard to believe your patience level. 🫡

 

Thank you so much Sir 

0 Likes