Inverse isolated / hidden

In default AutoCAD i use this code. REW for Rewind or something
The purpose is to hide isolated and isolate the hidden.
This is very handy for 3d modelling.
Not quite working 100% for BricsCAD now
Where does this code go wrong?

Comments

  • Nobody? I think the image is wrong. It show have said "INVERSE"..

  • I am absolutely not into that vl stuff, but it seems that the visibility property corresponds to the dxf group-code 60 - which changes an object's visibility persistently between drawing sessions. This will only yield the desired result if OBJECTISOLATIONMODE is set to a respective value. If set to 0 (seems to be the default) isolating or hiding objects uses a different mechanism (I don't know which), therefore the script succeeds in hiding entities, but not in unhiding. I changed the code a bit to work around the problem, hope this makes sense to you...

  • Jason Bourhill
    edited May 2020

    You've possibly had no response because you've provided so little information. On the face of it the LISP should work and worked on a simple drawing I tried it on. If it's not working for you, then some additional detail on the investigations you've made for yourself would be helpful, along with any error messages and an example file that you know exhibits the issue.

    Regards,
    Jason Bourhill
    BricsCAD V20 Ultimate
    CAD Concepts

  • Thanks for looking at it and you are right Jason. I was not giving much information to begin with
  • I came across a situation where the code fails in BricsCAD. The problem occurs if there is a CAMERA on the drawing. BricsCAD LISP won't return the object for these entities

    e.g.
    : (vlax-ename->vla-object (car (entsel "\nSelect a Camera: "))) Select a Camera: nil

    So if there are CAMERAs on your drawing, then the LISP can fail.

    Attach an update to the code that allows for this.

    Regards,
    Jason Bourhill
    BricsCAD V20 Ultimate
    CAD Concepts

  • This puzzles me a little... can this be platform-dependent? On my V20 on Linux, OBJECTISOLATIONMODE has to be either 1 or 3 for this code to work reliably (unhide objects hidden by HIDEOBJECTS/ISOLATEOBJECTS)...

  • @Knut Hohenberg said:
    This puzzles me a little... can this be platform-dependent? On my V20 on Linux, OBJECTISOLATIONMODE has to be either 1 or 3 for this code to work reliably (unhide objects hidden by HIDEOBJECTS/ISOLATEOBJECTS)...

    I suspect that it may be a bug related to the Linux/Mac platform. I would raise an SR to get it investigated.

    Regards,
    Jason Bourhill
    BricsCAD V20 Ultimate
    CAD Concepts

  • Thanks Jason!

  • @Jason Bourhill
    I just checked with V20.2.07 on Windows - and cannot spot any difference to the behavior on Linux: vla-put-visible will toggle bit 60 (= persistent visibility change), regardless of the value of OBJECTISOLATIONMODE.
    It therefore seems incompatible with the 'new' (temporary) mode of visibility changing.

  • @Knut Hohenberg said:
    @Jason Bourhill
    I just checked with V20.2.07 on Windows - and cannot spot any difference to the behavior on Linux: vla-put-visible will toggle bit 60 (= persistent visibility change), regardless of the value of OBJECTISOLATIONMODE.
    It therefore seems incompatible with the 'new' (temporary) mode of visibility changing.

    My interpretation is that OBJECTISOLATIONMODE only relates to entities that have had their visibility state changed using ISOLATEOBJECTS or HIDEOBJECTS commands. These commands are toggling the same visibility bit, but must also (I assume) be maintaining a dictionary record of the objects they have worked with. Objects hidden using these commands also look to be automatically filtered from ssget calls.

    LISP routines (such as the one in this post, and other BricsCAD commands) that directly set the visibility state are effectively bypassing OBJECTISOLATIONMODE as they don't update the necessary record. As such you need to take care in use, as you could inadvertently end up with invisible entities that you're unaware of.

    Regards,
    Jason Bourhill
    BricsCAD V20 Ultimate
    CAD Concepts

  • If OBJECTISOLATIONMODE is zero the 60 bit is not toggled by the _IsolateObjects command, but vla-get-visible will report the correct state. At least that is the case in V18.

  • Hans Lammerts
    edited June 2020

    __" As such you need to take care in use, as you could inadvertently end up with invisible entities that you're unaware of" __

    I have been using this custom reverse mechanism for a long time. First in AutoCAD, now in BricsCAD. Never has got me into trouble, The only thing is that some elements (AutoCAD vertical) will not let them hide occasionally. For the rest, it works just okay for me.

  • Well, as long as you do not forget to set all objects to visible before closing the drawing. As said before, if you want to use such code, you should force all commands to use bit60 by setting OBJECTISOLATIONMODE to 1 or 3. Otherwise the code will not succeed in unhiding objects hidden with HIDE/ISOLATEOBJECTS, and vice versa.

  • Hans Lammerts
    edited September 2020
    Alexandr Chernishev wrote a good working INVERT switch that is incorporated in SSO. A useful and powerful function to filter and isolate and hide

    Demo
    https://youtu.be/Vorxj0ZHMc8

    Details and download
    Chexk the
    BricsCAD Store
    A>V>C>