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.

Layering by rules

Tunalover

New member
Folks-


I'm trying to inject standardization into a company that hasn't done so over 12yrs of Pro/E use. One thing I'm trying to do is to design mapkeys to bring in all new layers and to assign entities to the layers using rules. Questions:


How does one add all axes to one layer using a rule? There seem to be an infinite choice of methods and none seem to be working!


Is there a way to delete all layers from a model if the number and names vary from one model to the next?


Is there a good, thorough reference somewhere that can provide guidance on assigning entities to layers by rules?
 
For one thing, to me, the layers in Wildfire 1 and 2 are completely screwed up.


I got the layers to finally work in WF 1 but then they changed it again in WF 2 and that did it for me.


One thing you could try is using default layer names where you set up the layers in your config.pro and put these layer names in your start part. Whenever you create an axis, surface etc.. it will automatically go to the specified layer.


The last time I used was Pro/E 2001, it worked perfect but since Wildfire I haven't bothered.
 
Tunalover said:
Is there a good, thorough reference somewhere that can provide guidance on assigning entities to layers by rules?


config.pro:


============================================================ ===================
! Layers
! ============================================================ ===================
! Turn on/off automatic layering with following config options
create_numbered_layers yes
!create_numbered_layers no


!=========================================================
! Default Layers
!=========================================================
! The naming convention shown here for layers provides
! a way to organize your layers in a specific order. Pro
! sorts layers in alphanumeric order. As new layers are
! created, they will be added to the bottom of the list if
! they begin with an "alpha" character. They will be added
! to the top of the list if they begin with "0_". In addition,
! if you want to add new layers for a group of items, you can
! make them appear as indented layers. For example:
!
! 01_ALL_PLANES
! 01___DEF_PLANES
! 01___ANG_PLANE
! 02_ALL_CSYS
! 02___DEF_CSYS
! 03_ALL_AXES
! 03___HOLE_AXES


! Part and assembly layers:
def_layer LAYER_ASSEM_MEMBER 00_ALL_COMPONENTS
def_layer LAYER_SKELETON_MODEL 00__SKELETON_MODEL
def_layer LAYER_COMP_DESIGN_MODEL 00__DESIGN_MODEL
def_layer LAYER_COMP_FIXTURE 00__FIXTURE
def_layer LAYER_COMP_WORKPIECE 00__WORKPIECE
def_layer LAYER_FEATURE 01__ALL_FEATURES
def_layer 02__ALL_AXES
def_layer LAYER_AXIS 02____ADD_AXES
def_layer 02____DEF_AXES
def_layer 03__ALL_CSYS
def_layer LAYER_CSYS 03____ADD_CSYS
def_layer 03____DEF_CSYS
def_layer LAYER_CURVE 04__ALL_CURVES
def_layer 05__ALL_DTMS
def_layer LAYER_DATUM 05____ADD_DTMS
def_layer 05____DEF_DTMS
def_layer LAYER_IGES 06__ALL_IGES
def_layer LAYER_NOTE 07__ALL_NOTES
def_layer LAYER_POINT 08__All_PNTS
def_layer LAYER_SURFACE 09__All_SURFS
def_layer LAYER_THREAD_FEAT 10__ALL_THREADS
def_layer LAYER_COPY_GEOM 11__COPY_GEOM


! Drawing layers:
def_layer LAYER_DETAIL_ITEM 50__ALL_DETAILS
def_layer LAYER_DRAFT_DIM 51__DRAFT_DIMS
def_layer LAYER_REFDIM 52__REF_DIMS
def_layer LAYER_SYMBOL 53__ALL_SYMBOLS
def_layer LAYER_DWG_TABLE 54__ALL_TABLES
def_layer LAYER_DRAFT_GEOM 55__ALL_DRFT_GEOM


layersetup.pro:


!LAYER SETUP 1123
!
! Comment lines should begin with a "!"
!
! 1. The first column must always contain the layer name.
! 2. The display status may optionally be specified by entering one of
! the following: SHOWN, BLANKED, ISOLATED or HIDDEN.
! 3. Interface id may optionally be specified by preceding the id with #
! 4. You may specify as many sub-layers as you wish.
!
! eg.
!
! DATUMS SHOWN #100 DTM_PLANES AXES POINTS COORD_SYSTEMS
!
! NAME | STATUS | #ID | SUB-LAYER NAMES
!
01__ALL_FEATURES SHOWN #100
02__ALL_AXES SHOWN #101 02____ADD_AXES 02____DEF_AXES
02____ADD_AXES SHOWN #102
02____DEF_AXES SHOWN #103
03__ALL_CSYS SHOWN #104 03____ADD_CSYS 03____DEF_CSYS
03____ADD_CSYS SHOWN #105
03____DEF_CSYS SHOWN #106
04__ALL_CURVES SHOWN #107
05__ALL_DTMS SHOWN #108 05____ADD_DTMS 05____DEF_DTMS
05____ADD_DTMS SHOWN #109
05____DEF_DTMS SHOWN #110
06__ALL_IGES SHOWN #111
07__ALL_NOTES SHOWN #112
08__ALL_PNTS SHOWN #113
09__ALL_SURFS SHOWN #114
10__ALL_THREADS SHOWN #115
11__COPY_GEOM SHOWN #116
 
def_layer is the old school of thinking in layer management. I suggest that you setup layer rules in your start parts and get rid of the def_layers.


try these


axis


cosmetic


csys


curve


datum


points


quilt


surface
 
Morosso is correct. Layers do not work properly. Here is a mapkey to delete layers from parts.


mapkey lay_del @MAPKEY_NAMEdeletes old layers from part or assy;\


mapkey(continued) @MAPKEY_LABELDelete Old Layers;~ Select `main_dlg_cur` `PHTLeft.ShowCB`;\


mapkey(continued) ~ Close `main_dlg_cur` `PHTLeft.ShowCB`;\


mapkey(continued) ~ Activate `main_dlg_cur` `LayerTreePB`1 ;\


mapkey(continued) ~ Select `main_dlg_cur` `PHTLeft.PHLayerUI.LayerSettingsBtn`;\


mapkey(continued) ~ Close `main_dlg_cur` `PHTLeft.PHLayerUI.LayerSettingsBtn`;\


mapkey(continued) ~ Select `main_dlg_cur` `PHTLeft.PHLayerUI.LayerEditCasc`;\


mapkey(continued) ~ Close `main_dlg_cur` `PHTLeft.PHLayerUI.LayerEditCasc`;\


mapkey(continued) ~ Select `main_dlg_cur` `PHTLeft.PHLayerUI.LayerShowBtn`;\


mapkey(continued) ~ Select `main_dlg_cur` `FindCascBtn`;\


mapkey(continued) ~ Close `main_dlg_cur` `PHTLeft.PHLayerUI.LayerShowBtn`;\


mapkey(continued) ~ Close `main_dlg_cur` `FindCascBtn`;\


mapkey(continued) ~ Activate `main_dlg_cur` `TreeSearch_PushBtn`;\


mapkey(continued) ~ Input `layertreequery` `ValueInput` `*`;\


mapkey(continued) ~ Update `layertreequery` `ValueInput` `*`;\


mapkey(continued) ~ Activate `layertreequery` `AddBtn`;\


mapkey(continued) ~ Select `layertreequery` `ExprToFindList`1 `0`;\


mapkey(continued) ~ Activate `layertreequery` `FindNextBtn`;\


mapkey(continued) ~ Activate `layertreequery` `SelectAllBtn`;\


mapkey(continued) ~ Activate `layertreequery` `CloseBtn`;\


mapkey(continued) ~ RButtonArm `main_dlg_cur` `PHTLeft.PHLayerUI.AssyTree` `node0`;\


mapkey(continued) ~ PopupOver `main_dlg_cur` `LayerActionMenu`1 `PHTLeft.PHLayerUI.AssyTree`;\


mapkey(continued) ~ Open `main_dlg_cur` `LayerActionMenu`;\


mapkey(continued) ~ Close `main_dlg_cur` `LayerActionMenu`;\


mapkey(continued) ~ Activate `main_dlg_cur` `ActionMenuLayerDelete`;\


mapkey(continued) ~ Move `UI Message Dialog` `UI Message Dialog`2 10.647116 12.727273 ;\


mapkey(continued) ~ FocusIn `UI Message Dialog` `no`;~ FocusIn `UI Message Dialog` `yes`;\


mapkey(continued) ~ Activate `UI Message Dialog` `yes`;
 

Sponsor

Back
Top