LISP - get blocks connected by att

LISP - get blocks connected by att

cool.stuff
Collaborator Collaborator
571 Views
14 Replies
Message 1 of 15

LISP - get blocks connected by att

cool.stuff
Collaborator
Collaborator

Hi 🙂

 

Is it possible to select all connected blocks to another selected blocks based on field expression?

This att is "Visibility", which belongs to the secondary block.

The field expression in the primary block is:

 

%<\AcObjProp Object(%<\_ObjId 3040649936384>%).Parameter(1).VisibilityState \f "%tc1">%

 

Is it possible to select all primary blocks and then run the lisp to get all connecting secondary blocks that "belongs" to the primary ones?

 

Many thanks in advance 🙂

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

vladimir_michl
Advisor
Advisor
0 Likes
Message 3 of 15

cool.stuff
Collaborator
Collaborator

Thanks @vladimir_michl 🙂

But it only shows arrows...

It does not select both selected blocks and linked blocks...

Is there a way to do it?

Thanks

0 Likes
Message 4 of 15

cool.stuff
Collaborator
Collaborator

I have found this:

 

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-bloks-linked-to-a-main-block-by-...

 

but I cannot adapt to my case. Also I dont know how to change it to select all blocks linked to previous selected blocks.

 

Anyone can give me a hand please?

Thanks

0 Likes
Message 5 of 15

cool.stuff
Collaborator
Collaborator

@Sea-Havencould you please take a look? 🙂

 

Many thanks

0 Likes
Message 6 of 15

Sea-Haven
Mentor
Mentor

On holidays for a few days.

Message 7 of 15

vladimir_michl
Advisor
Advisor

The "Select dependent" option was added to the new version 1.8.

 

Vladimir Michl, www.arkance.world  -  www.cadforum.cz

 

Message 8 of 15

cool.stuff
Collaborator
Collaborator

@vladimir_michlthanks for your reply.

 

However, I only see 2 options/commands "fieldobject" and "fieldlink".

 

Could you explain please?

 

Thanks

0 Likes
Message 9 of 15

vladimir_michl
Advisor
Advisor

The FieldLink command is the same - only at the end it now offers to Select the source objects of the dependencies. Just download and APPLOAD the new version.

 

Vladimir Michl, www.arkance.world  -  www.cadforum.cz

 

Message 10 of 15

cool.stuff
Collaborator
Collaborator

Thanks @vladimir_michl 🙂 it works great 🙂

 

Just small problem from my side (not from your code):

Some blocks have fields with "###" because I have deleted some secondary blocks and I cannot select the linked blocks that still exist.

I got this error: "Automation Error. Description was not provided."

 

Because of this I cannot select the source objects.

 

Do you think you can skip this error in your code?

 

Many thanks again 🙂

0 Likes
Message 11 of 15

vladimir_michl
Advisor
Advisor

You are right - I should have thought of this condition - now fixed (no change in version number).

 

Vladimir Michl, www.arkance.world  -  www.cadforum.cz

 

Message 12 of 15

cool.stuff
Collaborator
Collaborator

@vladimir_michlmany thanks again for all your help 🙂

 

Sorry to say, but it still gives me the same error. It draws the arrows but does not show the selection menu...

 

Could you help please?

 

Many many thanks again

0 Likes
Message 13 of 15

cool.stuff
Collaborator
Collaborator

I have in the same block 2 field expressions.

Does it help in solving this problem?

 

Many thanks

0 Likes
Message 14 of 15

vmichl_cs
Enthusiast
Enthusiast

It should offer this, even for multi-link dependencies. Make sure you download today's ZIP file with the app and load the right .VLX.

 

fieldlink.jpg

 

Vladimir Michl, www.arkance.world  -  www.cadforum.cz

 

Message 15 of 15

cool.stuff
Collaborator
Collaborator

Yes, I got that 🙂

 

The problem is that my block is connected to 2 secondary blocks.

If one of them is deleted, in block attributes shows ### and the error comes from it.

If that is not the case, the VLX works perfectly.

 

I ask if there is any chance to ignore this error, once the arrows are drawn?

 

Many thanks and sorry for all the trouble 🙂

0 Likes