I have a command the create viewport with a specific scale. I have no problem setting the customscale but I'm having an error when setting the annotationscale.
So far here is what I have, I'm getting the error on line vp.Annotative = AnnotativeStates.True;
(vp = viewport, aaa = AnnotationScale)
vp.CustomScale = aaa.Scale;
vp.Annotative = AnnotativeStates.True;
vp.AddContext(aaa);
vp.AnnotationScale = aaa;