Unstable coordinate system

Hello

I've been struggling with coordinate systems for several days (Solidworks 2017), without success. My goal is to place the coordinate systems and axes of the joints correctly to export the assembly and do dynamic simulation. 

When I create a coordinate system, I define 3 references in the property manager: an origin point, an X reference and a Z reference (axis, cylinder or point):

 

I save my reference point by clicking on the little green "check". When I click on "edit function", the property manager opens, but the references I had chosen have changed! The X-axis is no longer defined:

 

I tried a lot of different configurations: defining the coordinate system with X, Y and Z, defining the coordinate system with X and Z, creating the coordinate system in the main assembly, in a subassembly, in the part, using axes as references, then cylinders, then vertices...

Nothing helps, the cues do not systematically memorize the references with which they are defined. Sometimes they "forget" one, sometimes 2, sometimes none. Sometimes the X reference is erased and a new reference is generated in Y.

Sometimes the coordinate systems change position without me modifying them, and without me modifying the geometry of their support.

 

All this is problematic because I use a pug-in (SW2URDF) to export the assembly, which is based on the transformation matrices of coordinate systems. However, the rotation values obtained at the output are often bad (while the XYZ values are good), which illustrates the problems mentioned above.

 

Hello

Personally , I use a 2D or 3D sketch to place the coordinate system


coordinates.sldprt