Jump to content
  • 3

"Unable to delete the objects" pop-up when deleting class


Andy Broomell

Question

Every so often I encounter this pop-up when trying to delete a class, and have never really understood the context of why it sometimes appears and sometimes doesn't.

UnableToDeleteClass.thumb.png.6123cdd20bb4b700490b7c5c7a29cc2e.png

 

 

The message seems to suggest that the class is being used by a Plug-in Object, but I know this isn't the case because typically it's a class I've made myself and it hasn't been used in any special way.

 

Today I finally realized the circumstances that cause this pop-up: objects in that class are being cut through in a Section Viewport.

(Regarding the text of the pop-up... perhaps a Section Viewport is technically considered a PIO? But I wouldn't have assumed so).

 

As it stands, I doubt a typical user understands what this pop-up means or what to do about it. It should be solved in one of two ways:

1.  Make it so that you can delete these classes, and it would brute force delete the objects even if they're being cut through in the Section Viewport.

-or-

2.  Alter the pop-up to better describe why the class can't be deleted, such as specifically saying it's because of a Section Viewport.

 

Note that this only applies when trying to use first option shown below, not when reassigning objects to a different class which is always possible but not the goal:

Reassign.thumb.png.8f95b5b9ed16c1609754b8cce4300c88.png

 

 

VE-101608

 

 

Edited by Andy Broomell
  • Like 3
Link to comment

9 answers to this question

Recommended Posts

  • 0

This is a bit baffling, why should a section viewport hold an object (and its related layer/class) captive when deleting a class. The normal class deletion procedure should have priority over a section viewport and the section viewport should update accordingly to the choice made when deleting a class (as per second dialog above).

 

This could mean that objects will be removed from the section view if the new class is not included in that viewport or deleted together with the classe but that is a choice the user should make, not VW.

Link to comment
  • 0

I am running into this dialog as well and it persists even in an empty drawing after I have deleted all the existing objects. I have not been able to trace the behavior to a specific workflow, but it is not related to section viewports for me. It stems in part from nested objects in the resource manager that are attached to a PIO, but deleting those resources still doesn't resolve the dialog popping up.

 

In the attached drawing for instance, I created a landscape area and then deleted it. I've maintained the classes and resources in the file if anyone wants to test themselves. In the screen recording, if I just delete the object, I'm unable to delete any classes attached to components or 2d/3d geometry. If I delete the objects in the RM, I'm able to delete classes associated with 2d/3d geometry, but not those associated with landscape area components. 

 

I agree with @Andy Broomell that the issue and its resolution are unclear from the dialog and with his suggestions. I could envision this really being a problem if I were nearing the end a large project and trying to clean up a drawing.

 

PWF

 

2023_03_03_forumReprex_unableToDelete.vwx

Link to comment
  • 0

I wrote a tool for this last July that can be used to track down objects using a class.  When you run it, you can select a class and it will build a list of every object using that class.  It will find objects embedded in groups or symbols, symbols with the class selected in the Symbol Options, whether the class is part of a wall style or material, etc.  You can then send the list to a worksheet (since VW won't let you do anything until the dialog box is closed), or select the offending object and VW will do it's best to take you to it.

 

 

  • Like 1
Link to comment
  • 0

Since we are on the topic of irritating dialogue boxes....:-) 

When working on a site model, I must click on this at least 30 times during the day..which is all well and good...

 

1264628431_Screenshot2023-03-03at5_23_52AM.png.2a9cf733e8948d8753cf3659eff755d8.png

 

But then... we get this.....which I am quite aware of, but have to 'acknowledge'  30 times....which does get old.

I sort of get why it is 'reminding' us of the situation, but it sure would be nice if there was some toggle to not be 'reminded'.

 

1889378617_Screenshot2023-03-03at5_24_26AM.png.b4a37acabce44632b69949a227281dd1.png

 

Link to comment
  • 0
25 minutes ago, Jesse Cogswell said:

I wrote a tool for this last July that can be used to track down objects using a class.  When you run it, you can select a class and it will build a list of every object using that class.  It will find objects embedded in groups or symbols, symbols with the class selected in the Symbol Options, whether the class is part of a wall style or material, etc.  You can then send the list to a worksheet (since VW won't let you do anything until the dialog box is closed), or select the offending object and VW will do it's best to take you to it.

 

 

 

If you open a new blank file + create a default unstyled Landscape area then immediately delete it + any resources which came with it (a line type?) you have a file with no objects + no resources in the RM. All that remains of the LA are the 'Site-DTM-Modifier' class (which you can delete) + the 'Site-Landscape Area-Spec' class (which you can't.) In order to delete the '-Spec' class you first have to run Purge with 'Special record formats' enabled. After purging the file of this format you are then able to delete the Spec class. Where does that format live? Would your script detect it @Jesse Cogswell? I think you said previously the script wasn't set up to find classes if the object in question is 'inside' an Extrude etc so presumably not... I had no idea all those special record formats were hidden in a black site somewhere, I assumed they were there in the RM... (I mean whenever I saw them listed in the Purge dialog - I never checked what/where they were before today).

Link to comment
  • 0

Okay, I looked at your file and think you've found a bug.  If I open up the Landscape Area Styles in the Resource Manager and delete the Meadow and Prairie Perennial Garden, VW will not let me delete the Component-Landscape class from the drawing, showing the error dialog that you shared earlier.  However, running the Purge command will now show the class as being unused, and will safely remove the class from the drawing.

image.png.43d9bb21d23b8e6f064d07c02f1c84a9.png

image.png.d5fad7fa2209f3179b534acdd4bd1a17.png

image.thumb.png.69d388d7c1cb9530d113b21f9fdec771.png

 

So, for some reason deleting the Style is enough to show the class as unused for Purge but not for the Organization dialog.  I don't have the Landscape module, so I can't interact with the Landscape Area plug-in, but looking through it, nothing in the Object Info Palette references the Component-Landscape class and stepping through the object after converting it to a group also does not reveal anything in that class.  My guess is that the class is hardcoded into the plug-in object (from a programming perspective, this is a bit of a dick move), so it doesn't follow the standard "rules" of whether the class is in use or not.

  • Like 1
Link to comment
  • 0

After doing a short experiment, my script currently does not find classes that are embedded in plug-in objects.  I feasibly could add that (and will when I get time), but it would require "stepping through" every plug-in object in the drawing to track down components using the target class.  In all honesty, the special record formats should have no real bearing on classes unless the VW file contains a referenced copy of the plug-in object to go along with the record format, and even with that addition my script would not have caught the Component-Landscape class since the object itself did not contain the class (though that might be because I don't have the actual plug-in installed).

 

I just did a test with one of my own PIOs that has an embedded class (set in the OIP, not hardcoded).  When I have an object in the drawing and try to delete the embedded class, I get the warning.  However, if I delete the PIO so that there is no longer one in the drawing, I can delete the class without any issues.  But the major caveat is that my PIO does not use Styles, so there might be something more tied up in Styles preventing what I would call "normal" operation.  I have not incorporated Styles into any of my plug-ins, partly because the documentation isn't very well defined and partly because I have a bit of an aversion to Styles cluttering up my Resource Manager and generally feeling clunky to use.

Link to comment
  • 0

@Jesse CogswellApologies that I'm just seeing this today, I think I may have forgotten to turn my notification settings back on after a vacation. Thanks for having a look. I admit I forgot about the Purge command, as I often do when I'm troubleshooting mid-project.

 

If this is a bug, for folks tracking that sort of thing, one thing it gets in the way of is adapting VW resources to custom in-house classing systems (this is how I ran into the issue), as classes that ship with the object will need to be purged every time. Anyway, thanks again.

 

PWF

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...