Eyeshot 11 Documentation
WinForms Control / Tutorials / Forcing entity regeneration
In This Topic
    Forcing entity regeneration
    In This Topic

    The following code fragment uses RegenMode property to force entity regeneration.

    myEntity.RegenMode = regenType.RegenAndCompile;
    viewportLayout1.Entities.Regen();
    MyEntity.RegenMode = regenType.RegenAndCompile
    viewportLayout1.Entities.Regen()

    The same property can be used to force entity compilation only (in this case you need to manually update the entity's bounding box).

    // ensures a valid bounding box (usually done by Regen())
    myEntity.UpdateBoundingBox();
    
    myEntity.RegenMode = regenType.CompileOnly;
    viewportLayout1.Entities.Regen();
    ' ensures a valid bounding box (usually done by Regen())
    MyEntity.UpdateBoundingBox()
    
    MyEntity.RegenMode = regenType.CompileOnly 
    viewportLayout1.Entities.Regen()
    See Also