Why you cannot use shortcuts to access the ViewportCapture settings


In the comments, G asks:

Why do you have do this:

si = Application
oViewportCapture = si.Dictionary.GetObject( "ViewportCapture" )
oViewportCapture.NestedObjects( "Start" ) = 10

and not this:

si = Application
oViewportCapture = si.Dictionary.GetObject( "ViewportCapture" )
oViewportCapture.Start = 10

CaptureOptions
The answer is that the ViewportCapture object is not a ProjectItem, and so does not support the Parameters property. ViewportCapture is a CollectionItemLegacy object (and before that, it was an SIObject).

si = Application
p = si.Dictionary.GetObject( "ViewportCapture.Start" )
p.Value = 10
#si.SetValue( "ViewportCapture.Start", 10 )

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s