Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I need to extract named coordinate system and its values from cad assembly. I know there are methods available in creoparametric toolkit. But it become inefficience considering number of cad and size of cad.
Is there a possible way to extract the details from published light weight binary files (OL).
Saw some methods in Creoview toolkit
Solved! Go to Solution.
Similar question - "How to export a CSV file containing point coordinates from a section path?": https://community.ptc.com/t5/Analysis/How-to-export-a-CSV-file-containing-point-coordinates-from-a/td-p/780850
Similar question - "How to export a CSV file containing point coordinates from a section path?": https://community.ptc.com/t5/Analysis/How-to-export-a-CSV-file-containing-point-coordinates-from-a/td-p/780850
In Creo I would traverse the assembly, get the transformation matrix of each component, visit any csys feature in this components, and multiply this with the matrix, finally export this 4 points to a file.
You need the assembly in a Creo session, else you don’t have the transformation. Without Creo - I have no clue, but with a light weight simplified representation this may possible as well, not sure about this. In Tcl I would think to solve this in about 45 minutes.
Thanks for the suggestion.
I can able to do with creo session or creo toolkit. but was looking from converted/ published files
# Synchronous mode with an active assembly
# Task: Transform the first found csys to world coord of the active assembly
# assumption each model has minimum one csys and skip assemblies
# ps_vist components -> will return a list of {COMP_N PATH_To_COMP_N COMP_N+1 PATH_To_COMP_N+1 ...}
# ps_assy matrix_get - default is -bottom_up yes get the matrix by the pathObj
# ps_visit csys returns the Geom IDs of each Csys in a given model, lindex 0 the first csys found
# ps_geom to_feat Type ID -> get the Feature ID of the GeomId
# ps_feat name FeatureID - the name of the feature ID
# ps_data csys csysObj -> the csys data Origin X,Y,Z Vector ...
# Csys transform Materix ResultCsys -> Origin X,Y,Z Vector transformed
# Csys origin,xvector, yvec ... -> a 3dPointObj
# pObj 3d_val - the numerical values
proc CSYS_Transform_Test {} {
set del ", "
set ASSY [ps_model current]
set fp [open c:/temp/$ASSY.csv a+]
puts $fp [join {Component CompPath CSysID OX OY OZ XX XY XZ YX YY YZ ZX ZY ZZ} $del]
ps_comppath compPathObj
ps_matrix matrixObj
ps_csys csysObj
ps_csys csysTransObj
foreach {MODEL PATH} [ps_visit components] {
if {[ps_model is_assembly -model $MODEL]} continue
compPathObj config -path $PATH
ps_assy matrix_get compPathObj matrixObj
set firstCsys [lindex [ps_visit csys -model $MODEL] 0]
set featID [ps_geom to_feat -model $MODEL csys $firstCsys]
set featName [ps_feat name -model $MODEL $featID]
ps_data csys -model $MODEL $firstCsys csysObj
csysObj transform matrixObj csysTransObj
csysTransObj origin Po
csysTransObj xvector Px
csysTransObj yvector Py
csysTransObj zvector Pz
set doubVals [concat [Po 3d_val] [Px 3d_val] [Py 3d_val] [Pz 3d_val]]
set formVals [eval format [list [string repeat "%.3f " 12]] $doubVals]
set csvVals [concat $MODEL [list $PATH] $featName $formVals]
puts $fp [join $csvVals $del]
}
close $fp
}
Is it possible to retrieve the same information from Creo view toolkit from Ol/Pvs file? I managed to do it using CreoParametric toolkit. Requirement is to extract it from OL.
Sorry but here I’m less then a newbie😫