Jump to content
  • 0

Deleting Classes


Mara I

Question

23 answers to this question

Recommended Posts

  • 0

Did this ever get resolved?  Curious, because I am having the same problem.  However, no objects are found using the custom selection tool even with all three components checkboxes checked.  No objects are found if I set the class in a worksheet criteria.  For all purposes, Vectorworks cannot find any objects using the class, however when trying to delete the class it says there are objects that use it.  Is there any way to simply "show objects using class" other than making a worksheet?  It would be great if the message also had a button for "click here to view objects assigned to this class."

Link to comment
  • 0

There must be some symbol definition or plugin or something that uses the unwanted class.

 

Vectorworkaround: add a “zz-“ prefix to the class name. They will drop to the bottom of your class lists. Out of sight, out of mind!

Link to comment
  • 0

That usually means that there is a symbol in the resource manager that is not inserted into the drawing that has that class set as the default.  

 

One way to find out is to open a blank document and import the symbols from your current drawing into it.  I usually do 5 at a time.  Watch the navigation palette.  When that class appears you've found at least one culprit.  🙂 

  • Like 1
Link to comment
  • 0
45 minutes ago, Boh said:

Vectorworkaround: add a “zz-“ prefix to the class name. They will drop to the bottom of your class lists. Out of sight, out of mind!

Thanks.  Yes, I actually use this idea for other classes.  I come from a sort of coding/programming mindset and it really just drives me nuts to have classes in there that serve no purpose other than to be unnecessary... kind of just feels sloppy.  Especially since I use z- prefixes for my own class naming purposes.

 

35 minutes ago, bcd said:

Or use Class Tags & Filters.

I'll look into this.  Not something I typically utilize.  Thanks.

 

53 minutes ago, michaelk said:

That usually means that there is a symbol in the resource manager that is not inserted into the drawing that has that class set as the default.  

 

One way to find out is to open a blank document and import the symbols from your current drawing into it.  I usually do 5 at a time.  Watch the navigation palette.  When that class appears you've found at least one culprit.  🙂 

Sure seems to be, but usually they will show up in a report worksheet if this is the case.  That doesn't really rule out the possibility though.  Nice strategy for isolating the problematic symbol, hadn't thought of it.  Thanks for the tip.

Link to comment
  • 0

If @michaelkis right (which he usually is) then perhaps try a purge on a copy of the file to see if deleting unused symbols will also get rid of the unwanted classes.

 

The purge command gives you a preview of all the unused symbol definitions so that might narrow things down a bit.

  • Like 1
Link to comment
  • 0

Try this as a test.  This script will create a text object at the origin of the drawing.  The text object will list every symbol in the drawing and the default insertion class, if any.

 

Obviously, make a copy of your drawing and try the script on the copy.  

PROCEDURE Test;
{26 May 2021
This script will create a text object that lists all symbols 
in the resource browser and their default classes, if any.}


	CONST
		kCR		=		CHR(13);
		kDiv	=		':  ';
		kHeading =		'Symbol Class Report';

	VAR
		ThisSymbol		: HANDLE;
		MessageToUser,SymName,CurrentDefaultClass	: STRING;
		insertMode,breakMode	: INTEGER;
		
PROCEDURE CheckDefaultClass (h:HANDLE);
	BEGIN
		IF GetType(h)=16 THEN
			BEGIN
				SymName := GetName(h);
	
				GetSymbolOptionsN(SymName,insertMode,breakMode,CurrentDefaultClass);

				MessageToUser := Concat(MessageToUser,kCR,
										SymName,kDiv,CurrentDefaultClass,kCR);
			END;
	END;		
		
		
BEGIN
	MessageToUser := '';
	ThisSymbol := FSymDef;
	
	IF ThisSymbol <> NIL THEN CheckDefaultClass(ThisSymbol);
	
	WHILE (NextSymDef(ThisSymbol) <> NIL) DO
		BEGIN
		
			ThisSymbol := NextSymDef(ThisSymbol);
			CheckDefaultClass(ThisSymbol);
		
		END;
	
	BeginText;
		Concat(kHeading,kCR,Date(2,2),kCR,MessageToUser)
	EndText;

END;		




RUN(Test);

 

Link to comment
  • 0

Firstly, thank you so much for all the effort you've put into helping figure this out.  Very much appreciated.  I was out of the office yesterday when you made these suggestions, but I will be trying them out today.  I'll let you know how it goes.

Link to comment
  • 0

I feel like there is either some concept about classes/symbols that I'm just not getting or this is a bug, but here's what I've got going:

 

I found one symbol using @michaelk's import to new file method that was adding an unintended class, which I'll call 'WrongClass.'  The symbol itself is set to <active class>.  The objects in the Edit 2D/3D Components are set to their correct classes.  The issue was the 3D Hole Cut... an extruded rectangle assigned to WrongClass!  I re-assigned it to the None class and thought that would take care of it, but no.  Unable to find anything else within the symbol that was assigned to WrongClass, I deleted all objects from 2D, 3D, and 3D Hole Cut using Select All (to avoid missing anything).  All classes were set to visible and the drawing had only one layer.  I added a simple line to the 2D component using the None class just so the symbol would not be empty.  At this point, the only thing in the symbol is a line set to the None class.  The symbol itself was set to <active class> and the current active class was None.  Other than the single imported symbol, the document is brand new, completely empty.

 

I still am unable to simply delete WrongClass and Vectorworks asks where I would like the object reassigned.  Unfortunately, the script @michaelk put together (which is awesome) seems to only list the class assignments for the symbol itself, not for any sub-objects.  So running that just shows no default class.  If I take the symbol after having it contain only the line and import it into a new file, WrongClass still shows up.

 

Am I just completely missing something?

Link to comment
  • 0

It's interesting that the Building-Doors-***Stage Access Class still imports with the Symbol.

I could sucessfully delete the Class in the Tools>Organization> Delete all of the Objects

also in the Navigation Palette - but not by selecting Building but rather the ***Stage Access

 

I don't think you're understanding is off - I think it's a bug.

Link to comment
  • 0

Hey @JB_Tech3

 

I had a look at your file. This is interesting. It seems that when you decompose the polylines defining one of the extrudes in the 3d component of the "AC Outlet Horizontal", then some of the lines pop up in the Building-Doors-***Stage Access class.

 

However changing these lines to the none class and recomposing the polylines still doesn't allow the Building-Doors-***Stage Access class to be purged from the file. It somehow seems to be stuck to the symbol. No other decomposed geometry in the symbol showed up the Stage Access class.

 

To get rid of the class I had to rebuild the symbol - essentially copying and pasting all the 2d, 3d and wall component geometry into a new symbol definition. Attached is your file with the rebuilt symbol - now called "AC Outlet Horizontal - New". This file doesn't have the Stage access class in it. Phew!

 

So if you import the "New" symbol into your file then delete the old one, replacing all instances of the old with the new as you go, then you should be able to delete the Stage Access class. That's assuming there are no other symbols in your file displaying similar behaviour. Good luck!

 

image.thumb.png.58b4f186a7067d75091ea09e4f888738.png

ClassAssignmentIssue.vwx

  • Like 2
Link to comment
  • 0

Wow!  This is definitely something I would not have thought of.  There are other symbols in the file that do this and I'm guessing its due to to same problem, or something similar.  Just goes to show, pay attention and make sure classes are set correctly from the start.  This community is truly unparalleled.    Everyone, thank you so much for helping resolve this!  Time to get to work on the other symbols!

  • Like 1
Link to comment
  • 0
3 hours ago, line-weight said:

 

Does this mean that the "compose" command remembers the classes of the individual components even if they are different from whichever class the composed polygon ends up in?

 

Not sure. Needs further investigation. There is something about it being in a symbol that came into play. I ran out of time to play further.

Link to comment
  • 0

This is one of those things that happens in the DWG world as well if components of a symbol/block have defined layers etc. That is why DWG has the layer 0 (zero) for blocks, any block that is completely created on layer 0 with properties set to bylayer will take on the properties of the insertion layer. Hard defined linetypes (e.g. dashed line) will be kept, as long as it is all on layer 0.

 

VW should have something similar for standard symbols, that could save a lot of dealing with predefined classes that one doesn't want anyway because of company, client or even project standards. Especially when working  on a multinational project where local standards use different class/layer names (e.g. local language names) and things are defined at the project level to keep everyone using the same naming system. Symbols can often be the same, but class/layer naming can as often be different.

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...