Just a simple proc
The Input is the name of the Csys and the name of the solid.
Extract the Matrix from the Csys, and feed this for calculation the outline
- Get a ModelItem Obj
- Make sure the given csys name exists
- Get the Geom ID
- Extract the csys data
- Get the matrix
- Get the outline
- Get the vector (x,y,z)
- In a loop create/update the parameter
Only if the csys is rotated, the values will differ from the default.
proc Get_Outline_Ref_By_Creo {CSYS MODEL} {
# Get the matrix out of an existing CSYS
ps_modelitem miObj
set found [miObj byname $MODEL csys $CSYS]
if {$found == 0} {
ps_mess "CSYS $CSYS not found in Model $MODEL"
return 1
}
# Get the GeomID from CSYS modelitem
set GeomID [miObj cget -id]
# Get the Orientation Matrix from this Csys
ps_data csys -model [ps_model cur] $GeomID csysObj
# Now feed a Matrix based on the Csys
csysObj matrix matrixObj
# The is a line in 3D Space
set exclList [list ALL_CRVS AXES CSYS PLANE POINT]
ps_data outline -model $MODEL -matrix matrixObj -exclude $exclList lineObj
# Need only the max dims x2-x1, y2-y1 and z2-z1 this is a point with 3 values
lineObj diff maxPoint
# maxPoint 3d_values will return the x,y and z value
foreach pname {MAX_LENGTH_X MAX_LENGTH_Y MAX_LENGTH_Z} val [maxPoint 3d_values] {
ps_mess "Creo set $pname $val"
ps_param set -model $MODEL $pname DOUBLE $val
}
# No error
return 0
}
Called with:
Get_Outline_Ref_By_Creo cs0 [ps_model cur]
Here a screenshot

Or do it by yourself
proc Get_Outline_Ref_By {CSYS MODEL} {
# Get the matrix out of an existing CSYS
ps_modelitem miObj
set found [miObj byname $MODEL csys $CSYS]
if {$found == 0} {
ps_mess "CSYS $CSYS not found in Model $Model"
return 1
}
# Get the GeomID from CSYS modelitem
set GeomID [miObj cget -id]
# Get the Orientation Matrix from this Csys
ps_data csys -model [ps_model cur] $GeomID csysObj
# Now feed a Matrix
# based on the Csys
csysObj matrix matrixObj
# The is a line in 3D Space
ps_solid outline -model $MODEL lineObj
# Multiply the with the csys Matrix
# Create a new lineObj
lineObj transform matrixObj lineTransObj
# Need only the max dims
# x2-x1, y2-y1 and z2-z1
# this is a point with 3
lineTransObj diff maxPoint
#
# maxPoint 3d_values will return the x,y and z value
#
foreach pname {MAX_LENGTH_X MAX_LENGTH_Y MAX_LENGTH_Z} val [maxPoint 3d_values] {
ps_mess "Manual set $pname $val"
ps_param set -model $MODEL $pname DOUBLE $val
}
return 0
}
or just get an outline
proc Get_Outline {MODEL} {
# The is a line in 3D Space
ps_solid outline -model $MODEL lineObj
# Need only the max dims
# x2-x1, y2-y1
# this is a point with 3
lineObj diff maxPoint
#
# maxPoint 3d_values will return the x,y and z value
#
foreach pname {MAX_LENGTH_X MAX_LENGTH_Y MAX_LENGTH_Z} val [maxPoint 3d_values] {
ps_param set -model $MODEL $pname DOUBLE $val
}
}