How Do I Reverse The Effect Of AutoCadBlockReference.Visible?
My question is very simple but I seem to be having quite a bit of trouble finding an answer. In code I have this:
block.Visible = false;
But I have no idea how to reverse this in AutoCAD 2012. I can't see this block anymore (makes sense) but I also can't change this seemingly unfindable "Visible" property back to true.
Yes I understand that I can't select it on screen. I can use something like QSELECT to select the invisible block, but how do I change it back to visible?
If you set the entity visibility off by code, just set visibility on by code too, use a select all with a filter and check the visibility property of each entity.
I know I can do it in code, but I want to be able to do it in AutoCAD directly. I find it hard to believe that the code can do something that can't be reversed in AutoCAD.
This seems to be the closest thing - however this is the result of it:
Command: _UnIsolateObjects No objects to unisolate.
I know that there are 3 blocks that are hidden but doing an unisolate does not reshow them. Any thoughts?
I've run a few tests and ...
If an object is hidden by HideObjects or IsolateObjects
the programs are not using the visible property to control visibility
the visible=true does nothing
If you hide the object with visible= false then
UnIsolateObjects will do nothing to turn it back on
AutoCAD is using something different, probably a style or dictionary that you can't see to hide and show objects.
AutoCAD doesn't provide any way to set the Visibility property of an Entity to false, so why are you expecting it to provide a way to do the opposite?
If you set the Visibility property through code, then it should only be reversable by your code, otherwise, the user can break an application that relies on them not being able to change something the application does not want them to change directly.