News:

When posting a problem be sure to include which version you are using.  Give as much information as possible.  If the problem is with a specific file be sure to attache it to your post.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Removing Stubborn Layers

Started by JoeM, May 14, 2019, 12:46:32 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

JoeM

Hi all,

I recently figured out something that had long given me aggravation, and thought I would share the information.

I like to strip files down to the minimum, particularly when starting from imported files, to reduce file size and the chance of corruption.

I noticed when using the "purge" command that some layers would not delete even though there was apparently nothing on them.  You can delete them manually, but this always made me nervous - obviously the software had a reason for not getting rid of these layers.

I have found that layers are not deleted by the purge command if the 2D object that served as the basis for a 3D object was created there. This is true even if the 2D object was subsequently deleted and even if the editing tree history is turned off.

The only way to get rid of these "phantom dependencies" is to explode the 3D object to an ACIS solid (i.e. no extrudes, revolves, lofts, etc.). 

My solution was to define and save a "select by" filter that selects all 3D objects that can contain dependencies on 2D objects (i.e. parts, extrudes, revolves, etc.).  Then I select using this filter, explode all of the appropriate 3D objects to ACIS at once, and run purge.  Purge will then remove all the empty layers.

Hope this is of interest to someone.

Sincerely,

JoeM

Andy H

Good to know.  I use purge occasionally when the file size gets really big.   Thanks for posting.

AussieBloke

Thats a good tip Joe you should share the filter for others to use.

JoeM

This is the saved Query.

Nothing special - just went down the list and selected any solid that explodes to an ACIS solid.


('Object type'='Box' OR 'Object type'='Branched Loft' OR 'Object type'='Cone' OR 'Object type'='Cylinder' OR 'Object type'='Extrude' OR 'Object type'='Loft' OR 'Object type'='Part' OR 'Object type'='Rail' OR 'Object type'='Simple Extrude' OR 'Object type'='Sphere' OR 'Object type'='Spin' OR 'Object type'='Sweep' OR 'Object type'='Torus' OR 'Object type'='Twisted Extrude' OR 'Object type'='Wedge') 


Hope this helps,

Joe

Henry Hubich

Quote from: JoeM on May 20, 2019, 12:05:53 PM
This is the saved Query.

Nothing special - just went down the list and selected any solid that explodes to an ACIS solid.


('Object type'='Box' OR 'Object type'='Branched Loft' OR 'Object type'='Cone' OR 'Object type'='Cylinder' OR 'Object type'='Extrude' OR 'Object type'='Loft' OR 'Object type'='Part' OR 'Object type'='Rail' OR 'Object type'='Simple Extrude' OR 'Object type'='Sphere' OR 'Object type'='Spin' OR 'Object type'='Sweep' OR 'Object type'='Torus' OR 'Object type'='Twisted Extrude' OR 'Object type'='Wedge') 


Hope this helps,

Joe

Joe, is the use of single quotes necessary (i.e., ' rather than ")?

Henry H

JoeM

Quote from: Henry Hubich on May 20, 2019, 01:36:03 PM
Quote from: JoeM on May 20, 2019, 12:05:53 PM
This is the saved Query.

Nothing special - just went down the list and selected any solid that explodes to an ACIS solid.


('Object type'='Box' OR 'Object type'='Branched Loft' OR 'Object type'='Cone' OR 'Object type'='Cylinder' OR 'Object type'='Extrude' OR 'Object type'='Loft' OR 'Object type'='Part' OR 'Object type'='Rail' OR 'Object type'='Simple Extrude' OR 'Object type'='Sphere' OR 'Object type'='Spin' OR 'Object type'='Sweep' OR 'Object type'='Torus' OR 'Object type'='Twisted Extrude' OR 'Object type'='Wedge') 


Hope this helps,

Joe

Joe, is the use of single quotes necessary (i.e., ' rather than ")?

Henry H

Henry,

I used copy and paste to transfer the query from the "select by query" dialog box to my post.

In TurboCad, I just determined that if you type in "Object Type" = "Box", Parse query returns "syntax error".
If you type in 'Object Type'="Box", Parse query returns "Query Parsed Successfully", however, if you save the query, it is saved as 'Object Type'='Box'.
Finally if you type in 'Object Type'='Box', the query is parsed successfully and the characters are unchanged.

My guess is that Select by query uses the single quote internally, but is smart enough to replace the double quotes in some cases.

Sincerely,

JoeM

Henry Hubich