Message 1 of 7
Not applicable
08-14-2014
02:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I wrote a .Net routine that inserts a group of dynamic blocks in various visibility states. When the routine is run, everything works and the blocks are inserted with the appropriate visibility states.
However, when I save/close and re-open the drawing, all of these blocks have reverted to the default visibility state. I've noticed that after the routine inserts the blocks, even though graphically they have the correct visibility state, in the triangle drop-down menu the visibility is still listed as the default state.
Is there some other property I need to set in order to get the blocks to remember their visibility state?
This is the relevant excerpt from my code:
'Open the block reference
Dim br As BlockReference = New BlockReference(New Point3d(plineInsertPt(i).X, plineInsertPt(i).Y - 3 / 32, plineInsertPt(i).Z), btrId)
br.Layer = "EE-FIRE"
br.ScaleFactors = New Scale3d(1)
'Get the block reference property collection
Dim propColl As DynamicBlockReferencePropertyCollection = br.DynamicBlockReferencePropertyCollection
'Iterate through the collection
For Each prop As DynamicBlockReferenceProperty In propColl
If prop.PropertyName = "Visibility" Then
prop.Value = myTypeColl(myAddColl(i + 1))
Exit For
End If
Next
ms.AppendEntity(br)
trans.AddNewlyCreatedDBObject(br, True)
Solved! Go to Solution.