Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Layer to gather all *new* features

dgs

New member
Attention Glenn Beer.
smiley17.gif


I would like to create a layer that will put all new features, regardless of type, on it as they are created. I do not want any existing features to be placed on that layer. Also, I'd want to at some point remove that 'auto add' rules from the layer so that new features no longer get placed on a layer.

How can I do that?

Here's the background: If I have a complete set of rule-enabled layers, made with Glenn Beer's methods, and I go about creating features that get placed on those layers, they will get hidden automatically if they are planes, axes, surfaces, etc. So I create a curve for a surface, and it's gone right after I create it, unless I isolate the curves layer, and then I get all the curves.

Of course, I can create a new layer, manually place these items there as I create them, and isolate that layer. This can be annoying and cumbersome and is likely to be a major source of frustration for my users.

I'd like to create a new layer via mapkey with the rule that all new features get put on this layer, which is then isolated. Then I can create whatever I need to without it disappearing. When I'm done with that area of the design, I can run another mapkey to remove the rule and prompt a rename of the layer, leaving a layer with that subset of geometry already on it.
 
The key difference is Associative versus non associative layers take a look at the long help description.

If you create a layer called old and set rules for layer like status Feature id=* asnd make it associative it will
"Add all items currently matching the criteria for layer rules"

If you make a new layer with same rules featrure name = any (*) and make the layer non-associative, then
"It will add items to the layer if they meet the criteria on creation and thus will add any new items or features created since last save to the new layer.

You can create a Layer Calender if you so Choose. Just remember to make the old layer rules Associative and the new rules Non Associative"

You can swap this setting by editing Layer Properties there is a drop down with three options for settings the topmost being Check/uncheck Associative.

I've created 2 mapkeys that can be used to toggle the associativity of a selected Layer
lta - layer toggle associative
ltn - layer toggle non-associative

Michael


Edited by: mjcole_ptc
 
Would it be an idea, to let an config.pro option place the new features on layers?
By naming the new layers similar to your excisting layers it might be possible to transfer the features to the old layers later on by Mapkey and Find.


Config.pro option, that creates layers and places specific, NEW features on this layer. Like for excample:
def_layer layer_axis dtm-axis_new
!this option creates layer dtm-axis_new, and puts new axis featureson it.



other excamples.(there are more than that):
def_layer layer_datum dtm-plns_new
def_layer layer_point dtm-pnts_new
def_layer layer_curve dtm-crvs_new
def_layer layer_surface dtm-qilt_new
def_layer layer_csys csys_new
def_layer layer_dim dims_new
def_layer layer_note notes_new
 
<title>Layer to gather all *new* features</title>I asked this on the PTC|User list and got my answer, which is what mjcole_pts said. The key is making the rules not associative.<br style="font-family: Verdana,Arial,Helvetica,sans-serif;"><br style="font-family: Verdana,Arial,Helvetica,sans-serif;">Here's the method I settled on:<br style="font-family: Verdana,Arial,Helvetica,sans-serif;"><ul style="font-family: Verdana,Arial,Helvetica,sans-serif;" dir="ltr">[*]<div align="left">Create a new
layer.</div>
[*]
<div align="left">Click on the 'Rules'
tab in the layer dialog.</div>
[*]
<div align="left">Click on the
'Options' drop down near the bottom in the center.</div>
[*]
<div align="left">Make sure
'Independent' is selected and 'Associative' is not. (Independent means you can
create new rules, Associative means it evaluates the rules for all features, not
just new ones)</div>
[*]
<div align="left">Now click the 'Edit
Rules ...' button to the right. This brings up the Rule Editor dialog (same as
the find tool)</div>
[*]
<div align="left">In the Rule Editor,
select:</div>
<ul>[*]
<div align="left">Look For:
feature</div>
[*]
<div align="left">Look by:
Feature</div>
[*]
<div align="left">History tab:
All</div>[/list][/list]
When I no longer
want to gather new features on this layer, I go back to the Properties dialog
for that layer, select the 'Rules' tab, select the 'Options' drop down and
uncheck 'Rules Enabled'. By toggling that setting, I can turn the rules on and
off.I like rules vs. the config option because they are more flexible and they are part specific. The default layer options work on everything in session, I want to change this part by part. Also, with layer rules I can fine tune my search. Features with quilts that aren't copy geoms or mirrors, for example.
 
This might not get you exactly what you want, but you can also Activate a layer. The process is the same as activating a part in an assembly - right-click on the layer name and select Activate and it will then have the green diamond on the layer name.

While this layer is active, everything that you create will be added to this layer. Then when you finish, you can Deactivate the layer. The layer does not have to be rule-based.

The only issue here is that it adds everything to the layer, that includes dimensions, so if you hide the layer, you hide the dimensions. But it does show the dimensions first when you expand the layer to show it's contents, so it's relatively easy to simply select all the dimensions and remove them.
 
Yep, someone on PTC|User shared that as well. Nice functionality, but our layer policy is features only on layers, so that won't work for us.
 

Sponsor

Back
Top