Select Dyn blocks by code

Select Dyn blocks by code

Anonymous
Not applicable
224 Views
1 Reply
Message 1 of 2

Select Dyn blocks by code

Anonymous
Not applicable
Hi all,

Once inserted a dynamic block, it can be found by "ssetObj.SelectOnScreen gpCode, dataValue" code like it always worked. Now the dynamic block is rotated with the grip, and I can't select anymore that block with code.
I have tried: (1)
Dim gpCode(1) As Integer
Dim dataValue(1) As Variant
gpCode(0) = 0
dataValue(0) = "insert"
gpCode(1) = 2
dataValue(1) = "_Speaker02"
or (2)
Dim gpCode(0) As Integer
Dim dataValue(0) As Variant
gpCode(0) = 2
dataValue(0) = "_Speaker02"

Question:
How to select by code dynamic blocks that were dynamically changed ?

Thank you.

Johan
0 Likes
225 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
wrote in message news:4924423@discussion.autodesk.com...

Once inserted a dynamic block, it can be found by "ssetObj.SelectOnScreen gpCode, dataValue" code like it always worked. Now the dynamic block is rotated with the grip, and I can't select anymore that block with code.
I have tried: (1)
Dim gpCode(1) As Integer
Dim dataValue(1) As Variant
gpCode(0) = 0
dataValue(0) = "insert"
gpCode(1) = 2
dataValue(1) = "_Speaker02"
or (2)
Dim gpCode(0) As Integer
Dim dataValue(0) As Variant
gpCode(0) = 2
dataValue(0) = "_Speaker02"

Question:
How to select by code dynamic blocks that were dynamically changed ?

;---------------------------------


I just dealt with this yesterday. It seems as soon as the first modification is made to a dynamic block, the block is converted to an anonymous block, but the "EffectiveName" property retains the name of the original block.

What I did is filter for INSERTS using the NAME I was looking for, plus the NAME of [`*U*] (to find anonymous blocks). Then filter the list of anonymous blocks, using the "EffectiveName" property to search for your desired block name.

HTH


--

R.K. McSwain
http://rkmcswain.blogspot.com
0 Likes