the angle of the current rotation of a viewport contents - e.g. from the command mvsetup > align viewports > rotate view - is stored in the viewtwist variable (you must be in the modelspace of the respective viewport).
i have properly set the insunits and insunitsdefxxxx variables and despite of this, autocad insert command inserts my dwg block with improper scale (wrong units).
one of the possible reasons of this is using annotation scales. if the inserted block (dwg drawing) is set as "annotative" (the annotativedwg variable is set to 1), the insunits value is ignored for the insertion and its scale (units) is controlled by the current annotation scale.