Difference between revisions of "VS:GetRoofFaceAttrib"

From Vectorworks Developer
Jump to: navigation, search
m (1 revision)
(add remark)
 
Line 79: Line 79:
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<remark>
 
<remark>
Returns information about old-style roof objects (single roof faces).
+
([[User:Orso.b.schmid|Orso]], 2015.12.18):
 +
Hole style of openings:
 +
: 1 Vertical
 +
: 3 Splayed
 +
: 4 Square Cut
  
Returns slope, edge miter style, miter dimensions, and thickness of roof object.
+
 
 +
 
 +
Other authors:
 +
* Returns information about old-style roof objects (single roof faces).
 +
* Returns slope, edge miter style, miter dimensions, and thickness of roof object.
  
 
See Also [[VS:GetRoofFaceCoords| GetRoofFaceCoords]]() for additional roof face data</remark>
 
See Also [[VS:GetRoofFaceCoords| GetRoofFaceCoords]]() for additional roof face data</remark>

Latest revision as of 02:20, 18 December 2015

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

Description

Returns information on the referenced roof face object.
Table - Roof Miter Styles
Miter Style Constant
Vertical 1
Horizontal 2
Double 3
Square 4
PROCEDURE GetRoofFaceAttrib(
roofFace  :HANDLE;
VAR roofRise  :REAL;
VAR roofRun  :REAL;
VAR miterType  :INTEGER;
VAR holeStyle  :INTEGER;
VAR vertPart  :REAL;
VAR thickness  :REAL);
def vs.GetRoofFaceAttrib(roofFace):
    return (roofRise, roofRun, miterType, holeStyle, vertPart, thickness)

Parameters

roofFace HANDLE Handle to roof face object.
roofRise REAL Rise of roof.
roofRun REAL Run of roof.
miterType INTEGER Miter style of roof.
holeStyle INTEGER Miter style of openings.
vertPart REAL Vertical component of compound miters.
thickness REAL Thickness of roof.

Remarks

(Orso, 2015.12.18):

Hole style of openings:

1 Vertical
3 Splayed
4 Square Cut


Other authors:

  • Returns information about old-style roof objects (single roof faces).
  • Returns slope, edge miter style, miter dimensions, and thickness of roof object.

See Also GetRoofFaceCoords() for additional roof face data

Example

VectorScript

PROCEDURE Example;

PROCEDURE ShowRoofFaceAttrib(roofFace :HANDLE);
VAR
roofRise, roofRun :REAL; 
miterType, holeStyle :INTEGER; 
vertPart, thickness :REAL;
beg_pt, end_pt, upslope_pt :VECTOR;
Z :REAL;
BEGIN
IF GetObjectVariableInt(roofFace, 172) = 1 THEN BEGIN
GetRoofFaceAttrib(roofFace, roofRise, roofRun, miterType, holeStyle, vertPart, thickness);
Message('roofRise: ', roofRise,
',  roofRun: ', roofRun,
',  miterType: ', miterType,
',  holeStyle: ', holeStyle,
',  vertPart: ', vertPart,
',  thickness: ', thickness);

GetRoofFaceCoords(roofFace, beg_pt.x, beg_pt.y, end_pt.x, end_pt.y, Z, upslope_pt.x, upslope_pt.y);
beg_pt     := beg_pt     * (25.4 / GetPrefReal(152));
end_pt     := end_pt     * (25.4 / GetPrefReal(152));
upslope_pt := upslope_pt * (25.4 / GetPrefReal(152));
Locus(beg_pt.x, beg_pt.y);
Locus(end_pt.x, end_pt.y);
Locus(upslope_pt.x, upslope_pt.y);
END;
END;

BEGIN
 ForEachObject(ShowRoofFaceAttrib, ((T=71)));
END;
RUN(Example);

Python

def ShowRoofFaceAttrib(roofFace):
	if vs.GetObjectVariableInt(roofFace, 172) == 1:
		roofRise, roofRun, miterType, holeStyle, vertPart, thickness = vs.GetRoofFaceAttrib(roofFace)
		vs.Message('roofRise: ', roofRise,
		',  roofRun: ', roofRun,
		',  miterType: ', miterType,
		',  holeStyle: ', holeStyle,
		',  vertPart: ', vertPart,
		',  thickness: ', thickness)
		
		beg_pt, end_pt, Z, upslope_pt = vs.GetRoofFaceCoords(roofFace)
		
			
		
		vs.Locus(beg_pt[0]    * (25.4 / vs.GetPrefReal(152)), beg_pt[1]    * (25.4 / vs.GetPrefReal(152)));
		vs.Locus(end_pt[0]    * (25.4 / vs.GetPrefReal(152)), end_pt[1]    * (25.4 / vs.GetPrefReal(152)))
		vs.Locus(upslope_pt[0]    * (25.4 / vs.GetPrefReal(152)), upslope_pt[1]    * (25.4 / vs.GetPrefReal(152)));


def Example():
	vs.ForEachObject(ShowRoofFaceAttrib, '((T=71))')

Example()

Version

Availability: from VectorWorks 9.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox