Active Member
Posts: 10
Registered: ‎04-26-2006
Message 1 of 3 (87 Views)

Update blockreference in Acad2k7???

87 Views, 2 Replies
05-04-2006 06:50 AM
We had insert a blockreference into modelspace, reference is shown in database, but not on screen. After saving and reloading the drawing the blockreference is visible.
What shall we do to show block after insert???
Active Member
Posts: 10
Registered: ‎04-26-2006
Message 2 of 3 (87 Views)

Re: Update blockreference in Acad2k7???

05-06-2006 08:38 AM in reply to: ManfredM
We tried the block reference property RecordGraphicsModified with openmode.forwrite, but it didn't work.
Now we uses a workaround regenerating the insert layer like this:
' uses the acmgdinternal.dll of AutoCAD root folder
Imports Autodesk.AutoCAD.Internal

Public Sub RegenLayer(ByVal Layername As String)
Dim LayerIDs(0) As ObjectId
'creates new layer if not exists with color mix red green and blue
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
Dim tm As DBTransMan = db.TransactionManager
Dim ta As Transaction = tm.StartTransaction()
Dim LTR As LayerTable = CType(tm.GetObject(db.LayerTableId, OpenMode.ForRead, False), LayerTable)
'Check if Layer exists...
If LTR.Has(Layername) Then
LayerIDs(0) = LTR.Item(Layername)
Dim RegPen As Integer = LayerUtilities.RegenPending
LayerUtilities.RegenLayers(LayerIDs, RegPen)
End If
End Sub

It works!
Distinguished Contributor
Posts: 351
Registered: ‎12-05-2003
Message 3 of 3 (87 Views)

Re: Update blockreference in Acad2k7???

05-08-2006 05:52 AM in reply to: ManfredM
for my experise, you did not work with transition properly. make sure you commit every transition. especially you have embed transition.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!