Applies To Product(s): AutoPLANT Piping Version(s): V8i 08.11.05.36 Environment: N/A Area: N/A Subarea: N/A Original Author: Jesse Wolfe, Bentley Technical Support Group Overview By default, AutoPLANT seperates component's layers using several criteria. First, all components are assigned individual layers for each line numbers. However, within this constraint components are also assigned to seperate layers based on Component type (bolts, flanges, welds etc.) In some cases, it may be more desirable to simplify the way layers are assigned, perhaps simply grouping all components for a Line Number on a single layer. This article provides steps to accomplish this. The settings for Component layer assignment are controlled in the Compprop.ebs file for AutoPLANT. You can view this file in the Script Editor installed with AutoPLANT from the location C:\Program Files\Bentley\Plant XM\Modules\Base\common. **Note: In order to make this a Project Specific customization, store a customized version of this file at %Network Drive%\%Project Root%\%Project Name%\Config|Modules\Base\Common. You may need to create folders to accomodate this location.** Lines 238-244 define the default settings for layer naming by Line Number. No changes need be here unless you want to customize the default layer name. I have included an example of a custom layer where the string 'M2N-' is added as a prefix to the default Layer name by Line number: (changes in bold) Changing the Way Layer Names are formatted: Case "1" '// By Line Number status = at_Component_getString(compLineNumber, compID, "LineNumber") compLineNumber = "M2N - " + compLineNumber If(status = at_SUCCESS) Then tempLayer = compLineNumber status = at_PipingSystem_getColorByValue(layerColor, "ByLineNo", compLineNumber) End If Consolidating Components onto single layers: If you wish to consolidate multiple component types into a single layer you will need to find their individual naming scripts and 'comma out' the lines prescribing this function. See a few examples below: **Note: To 'comment out' a line in a Script file refers simply to adding a single apostraphe ( ' ) before a line of code, causing it to be ignored by AutoPLANT when performing functions. Placing Welds on on the main layer for a Line Number: The changes will be made on lines 385 and 391 of Compprop.ebs, as these lines will be 'commented out' as seen below: '// Update the component properties status = at_Component_setcompColor(fastenerID, "Red") fastenerLayer = at_ComponentProperties_getLayer(fastenerID, "Comp_Layer_Mode", layerColor) 'fastenerLayer = fastenerLayer + "_Welds" status = at_Component_setCompLayer (fastenerID, fastenerLayer, layerColor) '// Update the polyline properties status = at_Component_setPolyColor(fastenerID, "Red") fastenerLayer = at_ComponentProperties_getLayer(fastenerID, "Poly_Layer_Mode", layerColor) 'fastenerLayer = fastenerLayer + "_Welds" status = at_Component_setPolyLayer (fastenerID, fastenerLayer, layerColor) Placing Gaskets on the main Layer for a Line Number: The changes will be made to Line 421 and 428, which will both be 'commented' out as shown below: '// Update the component properties compColor = at_ComponentProperties_getColor(fastenerID, "Comp_Color_Mode") status = at_Component_setcompColor(fastenerID, compColor) fastenerLayer = at_ComponentProperties_getLayer(fastenerID, "Comp_Layer_Mode", layerColor) 'fastenerLayer = fastenerLayer + "_Gaskets" status = at_Component_setCompLayer (fastenerID, fastenerLayer, layerColor) '// Update the polyline properties polyColor = at_ComponentProperties_getColor(fastenerID, "Poly_Color_Mode") status = at_Component_setPolyColor(fastenerID, polyColor) fastenerLayer = at_ComponentProperties_getLayer(fastenerID, "Poly_Layer_Mode", layerColor) 'fastenerLayer = fastenerLayer + "_Gaskets" status = at_Component_setPolyLayer (fastenerID, fastenerLayer, layerColor) You can search through Compprop.ebs for the other component types and make similar changes for all component types defined there. See Also Product TechNotes and FAQs External Links Bentley Technical Support KnowledgeBase Bentley LEARN Server Comments or Corrections? Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!
↧