Method AddInfinityLine
- Namespace
- vdWebLibrary
- Assembly
- JsPropertiesExtractor.dll
AddInfinityLine(int, object, object, bool, object)
Create and add a new infinity line to active layout entities using the active common properties. It can be Ray or Xline.
public object AddInfinityLine(int infinitytype, object basepoint, object direction, bool drawit, object entities)
Parameters
infinitytypeintThe type of the Infinity Line. Use InfinityTypes_Ray or InfinityTypes_XLine for the type.
basepointobjectThe base point of the infinity line as an array of x,y,z like [x,y,z] in WorldCoordinate System.
directionobjectA vector normal with x,y,z which shows the direction of the infinityline like [x,y,z].
drawitboolDefines if the vdInfinityline object will be drawn.
entitiesobjectThe entities collection where the vdInfinityline will be added. This can be the entities of layout or a block.
Returns
- object
The vdInfinityline object created.
Examples
Example1: Add a new X Line with basepoint [0,0,0] and direction [1,0,0].
vdcanvas.AddInfinityLine(vdConst.InfinityTypes_XLine, [0, 0, 0], [1, 0, 0], true);
Example2: Add a new Ray Line with basepoint [0,0,0] and direction [0,1,0].
vdcanvas.AddInfinityLine(vdConst.InfinityTypes_Ray, [0, 0, 0], [0, 1, 0], true);
Remarks
You can create new points by using the newpoint(double, double, double) method.