PDA

View Full Version : How to preset the Center Line before Flattenner



Fisher.xue
11-26-2006, 07:49 PM
In my flattened drawing, the center line is in the same layer with the pipe. and its line type is "ByLayer".

How can I preset the center line before flat a drawing.
What I want is: after flattened, all pipe center line is in the layer "Center", type is "Center", and color is "8" (grey).
Is there some relation with "compprop.ebs"? If so, please take a look at my "C:\Program Files\Bentley\Plant 2004\modules\Base\common\compprop.ebs"

'///////////////////////////////////////////////////////////////////
'//
'// Function for updating properties for centerlines
'//
'///////////////////////////////////////////////////////////////////

Sub at_CenterlineProperties_update

Dim compID As at_ComponentID
Dim compLayer As String
Dim compLineType As String
Dim status As Integer

status = at_Component_getCurrID(compID)

If(status = at_SUCCESS) Then
compColor = at_ComponentProperties_getColor(compID, "Comp_Color_Mode")
status = at_Component_modColor(compID, compColor)

compLayer = at_ComponentProperties_getLayer(compID, "Comp_Layer_Mode")
compLayer = compLayer + "_CL"
status = at_Component_modLayer(compID, compLayer)

compLineType = at_ComponentProperties_getLineType(compID)
status = at_Component_modLineStyle(compID, compLineType)
End If
End Sub

it is confused that from "compLayer = compLayer + "_CL" ", the center line shouldn't be in the same layer with the pipe.

WiZardOz
11-26-2006, 08:08 PM
how did you create the centreline in the model ??? it uses this script when you create CL routers .. either before the pipework, or creating the routers from component

Also check that there is not a modified compprop.ebs on the project .. if there is it will be using the project file and not that one from your C: drive

Fisher.xue
11-26-2006, 09:06 PM
I didn't create anything (Line, Polyline, layer...) for centerline, everything is by AutoPLANT default. There were no centerlines in 3D model, but after flatenned, the centerlines were generated automatically.

By the way, where can I find the modified "compprop.ebs" if there has? :)

WiZardOz
11-26-2006, 09:27 PM
By the way, where can I find the modified "compprop.ebs" if there has? :)

this would be on the project .. in the same kind of file structure (ie config\modules\base\common)

will have a look at the flatten routine and see what I can find

WiZardOz
11-26-2006, 09:36 PM
The compprop.ebs is only a part of the pipe module (ie used for the routers centrelines) and not anything to do with the flatten routine

looks like there is no way to specify layers for the centrelines in the flattener .. best you can do is set a unique color or/and linetype in the flattener preferences for the CL's so that you can then use a filter in AutoCAD to select them all and put them on the layer name you want

(if you use this alot would be worth writing a lisp routine to run after flattener to automate this)

Fisher.xue
11-26-2006, 10:23 PM
Copy that. Thank you.

Colby
12-04-2006, 02:22 PM
In my flattened drawing, the center line is in the same layer with the pipe. and its line type is "ByLayer".

How can I preset the center line before flat a drawing.
What I want is: after flattened, all pipe center line is in the layer "Center", type is "Center", and color is "8" (grey).
Is there some relation with "compprop.ebs"? If so, please take a look at my "C:\Program Files\Bentley\Plant 2004\modules\Base\common\compprop.ebs"

'///////////////////////////////////////////////////////////////////
'//
'// Function for updating properties for centerlines
'//
'///////////////////////////////////////////////////////////////////

Sub at_CenterlineProperties_update

Dim compID As at_ComponentID
Dim compLayer As String
Dim compLineType As String
Dim status As Integer

status = at_Component_getCurrID(compID)

If(status = at_SUCCESS) Then
compColor = at_ComponentProperties_getColor(compID, "Comp_Color_Mode")
status = at_Component_modColor(compID, compColor)

compLayer = at_ComponentProperties_getLayer(compID, "Comp_Layer_Mode")
compLayer = compLayer + "_CL"
status = at_Component_modLayer(compID, compLayer)

compLineType = at_ComponentProperties_getLineType(compID)
status = at_Component_modLineStyle(compID, compLineType)
End If
End Sub

it is confused that from "compLayer = compLayer + "_CL" ", the center line shouldn't be in the same layer with the pipe.

Change the "compLayer = compLayer + "_CL"" to "compLayer = "MyAutocad Layer"