Hi Ron,
there are different workflows in SIMATIC AX, and Motion Control is handled differently in these workflows.
1. TIAX Library Workflow
Here, you write (part of) your PLC code in SIMATIC AX, and then create a TIA Portal library based on that. From this library you integrate the desired blocks in your TIA Portal project and connect the Technology Objects (via their DB number) as necessary.
2. TIAX Direct Loading Workflow
In this workflow, you describe the hardware configuration and the Technology Objects in the TIA Portal project. All the cyclic user program is programmed in SIMATIC AX. You can use Motion Control in this workflow, and you can attach your axes in SIMATIC AX via the "As<TO>AxisRef" functions. This function converts a DB_ANY to a REF_TO TO_<Type>, e.g. a REF_TO TO_PositioningAxis.
3. IT-like PLC engineering
There is no more TIA Portal in this, everything is handled in SIMATIC AX. For a motion control use case, this also includes the declaration and parameterization of Technology Objects. As of today, this is not yet available in SIMATIC AX.
In you specific case, I assume that you might have not used the "--non-overwriting" option for the Software Loader (sld).This option ensures, that the SIMATIC AX software loader does not remove the Technology Objects which have been defined in your TIA Portal project. Without the "--non-overwriting", the TOs will be wiped by the SLD and then the GetType function will return NULL.