Eyeshot 10 WinForms API Reference
SetCurrent Method

WinForms Assembly > devDept.Eyeshot Namespace > EntityList Class : SetCurrent Method
The BlockReference to set as current
If true, updates the scene bounding box. Set it to false for better performances in off-screen methods that call this to just use the devDept.Eyeshot.Entities.BlockReference.AccumulatedParentsTransform
Sets a BlockReference as current and updates the entity list with its block entities.
Syntax
'Declaration
 
Public Sub SetCurrent( _
   ByVal blockReference As BlockReference, _
   Optional ByVal updateBoundingBox As Boolean _
) 
public void SetCurrent( 
   BlockReference blockReference,
   bool updateBoundingBox
)

Parameters

blockReference
The BlockReference to set as current
updateBoundingBox
If true, updates the scene bounding box. Set it to false for better performances in off-screen methods that call this to just use the devDept.Eyeshot.Entities.BlockReference.AccumulatedParentsTransform
Remarks

If it is null, the current BlockReference is unset.

The BlockReference must be a first-level child of the one that is currently set (i.e. it must be in the Entities).

When a BlockReference is set as current, the following changes happen:

- The current devDept.Eyeshot.Entities.BlockReference is pushed on the CurrentBlockReferencesData stack.

- The entities of the current scene, minus the current devDept.Eyeshot.Entities.BlockReference, are put in a hidden Block (for internal use).

- The Block.Entities list of the current devDept.Eyeshot.Entities.BlockReference is shared with the Entities.

- The BoxMin and BoxMax are updated to consider the new entities, without the CurrentTransformation.

Since the collection is modified, this method can't be called in a Foreach loop.

See Also

Reference

EntityList Class
EntityList Members
SetParentAsCurrent Method
SetSelectionAsCurrent Method
SetCurrentStack Method
Entities Property
Entities Property