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

Dynamic block screen update issue.

1 REPLY 1
Reply
Message 1 of 2
Anonymous
331 Views, 1 Reply

Dynamic block screen update issue.

"I have a dynamic block with an associated hatch. When I insert it through .Net API and then change the dynamic properties (again with .Net) the hatch doesn't get updated. I have to issue a REGEN command to update it. I didn't have this problem in VBA. Is there any method I can use to force a regen of only that block on screen. I tried blkRef.Draw() but it didn't help.
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

may be it helps:
Private Sub UpdateBlockGraphic(ByVal BlockID As ObjectId)
Using db As Database = Application.DocumentManager.MdiActiveDocument.Database

Using tr As Transaction = db.TransactionManager.StartTransaction

Dim curBlock As BlockReference = CType(tr.GetObject(BlockID, OpenMode.ForWrite), BlockReference)
curBlock.RecordGraphicsModified(True)

tr.Commit()
tr.Dispose()
End Using
End Using

End Sub
or try:
Autodesk.AutoCAD.ApplicationServices.Application.UpdateScreen()

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