VS:LinearDim

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Procedure LinearDim creates a linear dimension in a VectorWorks document.

Bit code values for dimension flags can be found in the VectorScript Appendix.

Linear Dimension


October 30, 2023 Pat Stanford The image above is incorrect. The Offset shown in the image is not the offset that actually occurs in the function. The Offset value that is actually used in the function appears to be the offset of the text along the dimension line, specified in Page units. There is no option of the LinearDim function that will change the offset of the text away from the Dimension line.

If you need to change the text offset, you need to use SetObjectVariableReal with an index of 43 followed by a ResetObject. Something Like:

LinearDim(-2",2",1",2",-3",0,771,770,0.75);
SetObjectVariableReal(LNewObj,43,0); {0 for the value centers the text on the Dimension line}
ResetObject(LNewObj);
PROCEDURE LinearDim(
startPtX,startPtY :REAL;
endPtX,endPtY :REAL;
offsetDistance :REAL;
dimType :INTEGER;
arrow :INTEGER;
textFlag :INTEGER;
textOffset :REAL);
def vs.LinearDim(startPt, endPt, offsetDistance, dimType, arrow, textFlag, textOffset):
    return None

Parameters

startPt REAL X-Y coordinates of dimension start point.
endPt REAL X-Y coordinates of dimension end point.
offsetDistance REAL Offset distance of dimension line from object.
dimType INTEGER Dimension type flag.
arrow INTEGER Arrowhead style flag.
textFlag INTEGER Text style flag.
textOffset REAL Dimension text offset distance.

Example

VectorScript

LinearDim(-2",2",1",2",-3",0,771,770,0.75);

Python


Version

Availability: from All Versions