VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issue with thawing layers using VB.net

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
hakand
411 Views, 4 Replies

Issue with thawing layers using VB.net

Hey guys,
 
Currently having an issue with thawing a layer I have frozen via VB.net.
 
I have been using the layer manager to view if my changes have been picked up by autocad by seeing if the icon changes in the freeze column.
 
I am currently using :  'layerused.isfrozen = false '   to thaw it. When I set it to true, it freezes fine and the layer becomes hidden and the icon on the layer manager changes to the snowflake/ice icon.

When I change it to true, the icon changes back to the sun, but the layer stays invisible rather than reappearing.
 
Why does this happen?
 
After this whilst the layer is invisible but is thawed ... I click freeze (and the layer stays invisible, as it should if it is frozen) , then click thaw (and the layer appears as it should and the icon goes back to the sun icon).
 
Any info would be greatly appreciated.
 
Cheers

4 REPLIES 4
Message 2 of 5
truss_85
in reply to: hakand

Can you post your code?

 

The property that you mentioned must work fine.

It may be another thing to cause this problem from your code or trancastion.

Without your code our suggestion can not be usefull, only guesses...

 

Saygılarla...

Message 3 of 5
Alfred.NESWADBA
in reply to: hakand

Hi,

 

tried REGEN then?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 4 of 5
arcticad
in reply to: Alfred.NESWADBA

Try adding this.

 

tr.TransactionManager.QueueForGraphicsFlush()
doc.TransactionManager.FlushGraphics()
ed.UpdateScreen()
 

---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 5 of 5
hakand
in reply to: arcticad

thanks guys!

 

Both your replies did the trick.

 

I used REGEN and that worked so I had to change ed.UpdateScreen() to ed.Regen()

 

Many thanks again

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

Post to forums  

Autodesk Design & Make Report

”Boost