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

many UCS icons appear

4 REPLIES 4
Reply
Message 1 of 5
matus.brlit
458 Views, 4 Replies

many UCS icons appear

i have a simple routine, that sets background color fill to all dimension styles, that exist in current drawing here's the code: Public Sub Po_Setup() Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database Using trans As Transaction = db.TransactionManager.StartTransaction Dim dst As DimStyleTable = trans.GetObject(db.DimStyleTableId, OpenMode.ForRead) For Each oID In dst Dim dstr As DimStyleTableRecord = trans.GetObject(oID, OpenMode.ForWrite) dstr.Dimtfill = 1 Next trans.Commit() End Using End Sub it looks really innocent, but sometimes, after i run it and then zoom out, i get something like on the attached screen shot when i save the drawing, close it and open again, it looks alright again any ideas, why this happens?
4 REPLIES 4
Message 2 of 5
matus.brlit
in reply to: matus.brlit

oops, i didn't check the preview, this is how it was supposed to be formated

 

i have a simple routine, that sets background color fill to all dimension styles, that exist in current drawing here's the code:

 

 

    Public Sub Po_Setup()

        Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database

        Using trans As Transaction = db.TransactionManager.StartTransaction

            Dim dst As DimStyleTable = trans.GetObject(db.DimStyleTableId, OpenMode.ForRead)

            For Each oID In dst

                Dim dstr As DimStyleTableRecord = trans.GetObject(oID, OpenMode.ForWrite)

                dstr.Dimtfill = 1

            Next

            trans.Commit()

        End Using

    End Sub

 

 

it looks really innocent, but sometimes, after i run it and then zoom out, i get something like on the attached screen shot

when i save the drawing, close it and open again, it looks alright again

 

any ideas, why this happens?

 

edit, maybe this time it will work, this new forum design doesn't work in Opera

Message 3 of 5
caddzone
in reply to: matus.brlit

If you haven't tried this on more than one system with different graphics configs,

I'd start there to rule out any possibility that it's related to the graphics config on

the system (hardware and drivers).



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Message 4 of 5
matus.brlit
in reply to: caddzone

I only tried it on my system, and then I was afraid to deploy it

I can't check the HW relation, because it happens only occasionally

 

 

but I can imagine how this can scare the hell out of some colleagues, if I release it and it happens to them

Message 5 of 5
matus.brlit
in reply to: matus.brlit

I might have accused the wrong routine
there was one, that was ran before this one and I didn't dispose the transaction explicitly, so maybe the garbage collector didn't have his job done properly

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