okay, more information came in.
The drawing is a flat 2D drawing, no additional UCS's etc.
The original blocks are all purged and audited, reporting no errors.
I have now seen the resulting drawing when these blocks are programatically (see Keith's code) placed in a new file.
The weird thing is that all of the attributes are rotated to 0°.
Further weirdness... if I copy a block and explode it the attributes then rotate to the correct rotation (some 0° and some at 90°).
Even further, immediately after inserting them, if the user does a BATTMAN > SYNC, then ALL the attributes again move to their correct rotation.
Our program works in ACAD 2000 through 2008 but it's only 2008 that is displaying this erratic behaviour.
The process is this: (We are dealing with traffic intersections)
User inserts a load of blocks (via our program), all is well, These are all 4 way intersections
The user then has the option to swap some blocks ( for roundabouts and tee junctions etc)
The block to swap is selected, then programatically we....
Get the insertion point, scale and rotation of the original block
Grab all the attributes from the original block
Delete the original block
Prompt the user to specify which direction is not present (North South East or West) ~ this then defines which of 4 blocks is inserted in place of the original
Insert the new block at the same insertion point
Set the scale and rotation as per the original block
Populate the attributes
Rename the block (because of certain functionality, each block must have a unique name)
update the block
We then end up in this situation where some attributes are incorrectly rotated
Because we can immediately do a BATTMAN > SYNC and everything is correct, it leads me to believe that it is a bug in AUtoCAD, not our software. The block definition must be correct for the block to update properly, so why is it not displaying properly when it's inserted ?