Pass in selection to ATTEDIT

Pass in selection to ATTEDIT

AGGilliam
Collaborator Collaborator
466 Views
6 Replies
Message 1 of 7

Pass in selection to ATTEDIT

AGGilliam
Collaborator
Collaborator

Long story short, we have nested blocks and I would like to create a selection set from the child blocks that contain our attributes and pass it into ATTEDIT. The part where I'm stuck, is that P doesn't sem to work within ATTEDIT to use the previous selection set. I tried manually selecting the attributes before running the command as well as using ssget to select everything before the command but it always says 0 found unless I manually select the attributes during the command instead of entering P. This was within the command prompt if that makes a difference?

 

This is the ATTEDIT command, the attribute values are all correct and works just fine if I replace the P with a manual selection

(COMMAND "-ATTEDIT" "N" "Y" "ATT" "ITEM" "*" "P" "760300" "W")

 

This is the ssget command I used, which contained 1243 entities

(SETQ ATTSSS (SSGET "X" (LIST (CONS -4 "<AND") (CONS 0 "INSERT") (CONS 2 "ATT*") (CONS -4 "AND>"))))

 

Am I missing something or is this just not an available functionality?

0 Likes
467 Views
6 Replies
Replies (6)
Message 2 of 7

Jonathan3891
Advisor
Advisor

I think if you convert your sset into a list you could iterate through it using attedit in command line.


Jonathan Norton
Blog | Linkedin
0 Likes
Message 3 of 7

paullimapa
Mentor
Mentor
0 Likes
Message 4 of 7

komondormrex
Mentor
Mentor

so you want to change attribute tagged "ITEM" in a bunch of blocks named "ATT*" from value "760300" to value "W"?

0 Likes
Message 5 of 7

AGGilliam
Collaborator
Collaborator
That was just a test, but yes that's basically the idea. They're also nested within another block, we'll call it the door block, that contains a bunch of other attribute blocks. I want the user to select the door blocks where they want to edit the attribute. My initial thought was to loop through the door blocks and create a selection set of the attribute blocks I wanted but I wasn't sure where to go from there since selecting the previous selection set doesn't work within ATTEDIT. I haven't had the chance to try anyone else's ideas yet.
0 Likes
Message 6 of 7

komondormrex
Mentor
Mentor

i think using 'attedit to work out your wanting is a dead end. and like it was already mentioned it needs to be solved using blocks' lists, attributes' lists, dcl...

0 Likes
Message 7 of 7

komondormrex
Mentor
Mentor

on the other hand you may select blocks needed like this

(sssetfirst nil (ssget "_x" (list '(0 . "insert") '(2 . "att*"))))

and change common attributes in the properties tab.

0 Likes