Method SetSun
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
SetSun(DxfSun)
Lights the viewport by a sun, as AutoCAD's SetSun: the sun made in code written at the end of the OBJECTS
section, owned by the viewport, which names it (group 361), and the class SUN listed in the CLASSES section where it
is not; the sun it had erased where the viewport owned it, as AutoCAD erases the old sun, and kept where another owns
it. viewport.SetSun(new DxfSun { Intensity = 1.5 }) gives a viewport AutoCAD's sun half as
bright again.
public DxfSun SetSun(DxfSun sun)
Parameters
sunDxfSunThe sun, made in code and in no file yet.
Returns
- DxfSun
The sun, in the viewport's drawing from then on, as AutoCAD gives its id.
Exceptions
- ArgumentNullException
Thrown when the sun is null.
- ArgumentException
Thrown when the sun is in a file already.
- InvalidOperationException
Thrown when the viewport is in no file, is erased, or is of a file older than R2007, which has no SUN.