I would like to import part in a active CPLANE but it is very difficult to compute the position on the active CPLANE.
Do you have an idea on this problem?
Example:
// ******************************************************
// Importation de la piece du fichier CKD en automatique
// ******************************************************
GETPOS "Indiquer la position de la vis: ", 1, hLocAnchor
if (@key == -3)
FINPROG
LOCATIONCOORD hLocAnchor, dx, dy, dz
PAUSE "dx=%.2f dy=%.2f dz=%.2f",dx, dy, dz
cpmat[0]= @cplanemat[0]
cpmat[1]= @cplanemat[1]
cpmat[2]= @cplanemat[2]
cpmat[3]= @cplanemat[4]
cpmat[4]= @cplanemat[5]
cpmat[5]= @cplanemat[6]
cpmat[6]= @cplanemat[8]
cpmat[7]= @cplanemat[9]
cpmat[8]= @cplanemat[10]
cpmat[9]= @cplanemat[12]
cpmat[10]= @cplanemat[13]
cpmat[11]= @cplanemat[14]
PAUSE "dx1=%.2f dy1=%.2f dz1=%.2f",cpmat[9],cpmat[10],cpmat[11]
// CPlane export position
PAUSE "dxc=%.2f dyc=%.2f dzc=%.2f",dx,dy,dz
// The coordinates dx dy dz are not good
dx=cpmat[0]*dx+cpmat[1]*dy+cpmat[2]*dz
dy=cpmat[3]*dx+cpmat[4]*dy+cpmat[5]*dz
dz=cpmat[6]*dx+cpmat[7]*dy+cpmat[8]*dz
MATRIXA 10,cpmat
// Repertoire et nom du fichier CKD de la piece a importer
$RepNomCkd="C:\\KEYCREATOR4.0\\CKD\\VIS.CKD"
// ******************************************************
Rotate = 0
Scale = 1
IMPORTPART $RepNomCkd,$Vis,10, dx, dy, dz,\
Rotate, Scale, nParentOpt, , nLevelOpt , nLevelOffset , , ,
NoteState
// ******************************************************
// Fin de programme
// ******************************************************