.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

dynamic block

3 REPLIES 3
Reply
Message 1 of 4
fallright
412 Views, 3 Replies

dynamic block

I've made a dynamic block (see attch). It a rectangle that can be stretched with the arrows when clicking on the block.

The code below "finds" the block when inserterd, but once the arrows are used to strech the block the code doens't find the block any more. How can this ?

myfilter(0) = New DatabaseServices.TypedValue(DatabaseServices.DxfCode.BlockName, "vbredakdettek")

myPSR = myEd.SelectAll(mySF)

mySS = myPSR.Value

If mySS Is Nothing Then

  myEd.WriteMessage(vbLf & "  block is'nt found ")

end if

 

3 REPLIES 3
Message 2 of 4
t.willey
in reply to: fallright

Once you change a dy block property, then the block becomes an anonymous block.  Since you only use an ssget filter with the real name, it will not find it.

Message 3 of 4
Jeffrey_H
in reply to: t.willey

Grab the BlocktableRecord of the block then use the

BlockTableRecord.GetAnonymousBlockIds Method to get the ObjectIds of the block references
You can also find your answers @ TheSwamp
Message 4 of 4
Jeffrey_H
in reply to: Jeffrey_H

Sorry if my memory is right then 

BlockTableRecord.GetAnonymousBlockIds will give you the ID of the BlockTableRecord of the anonymous Block, so then can use BlockTableRecord.GetBlockReferenceIds

You can also find your answers @ TheSwamp

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost