VS:IFC GetSpaceParamFO: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
No edit summary
Line 6: Line 6:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<desc>
<desc>
Gets the space type, name or number</desc>
Gets the space type, name or number of the Space object.</desc>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
Line 25: Line 25:
hSpace
hSpace
HANDLE
HANDLE
 
Handle to the Space object.
</line>
</line>
<line>
<line>
inStrParam
inStrParam
STRING
STRING
 
The Space param value. "1" for Space Type. "2" for Space Name. "3" for Space Number.
</line>
</line>
<line>
<line>
outStrResult
outStrResult
STRING
STRING
 
The result.
</line>
</line>
</lineList>
</lineList>
Line 44: Line 44:


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<sample></sample>
<sample>
To use the sample you need to have a selected Space object on the drawing.
 
==== VectorScript ====
<code lang="pas">
PROCEDURE Test;
VAR
hSpace : HANDLE;
ok : BOOLEAN;
res : STRING;
BEGIN
hSpace := FSObject( LActLayer );
if ( hSpace <> nil ) then
begin
{We suggest the handle is a handle to Space object.}
{Additional verification could be done.}
{Get the Space Type}
ok := IFC_GetSpaceParamFO( hSpace, '1', res );
 
{Get the Space Name}
ok := IFC_GetSpaceParamFO( hSpace, '2', res );
{Get the Space number}
ok := IFC_GetSpaceParamFO( hSpace, '3', res );
end;
END;
 
RUN(Test);
</code>
==== Python ====
<code lang="py">
</code>
</sample>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------

Revision as of 11:21, 26 October 2018

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

Description

Gets the space type, name or number of the Space object.

FUNCTION IFC_GetSpaceParamFO(
hSpace :HANDLE;
inStrParam :STRING;
VAR outStrResult :STRING) : BOOLEAN;
def vs.IFC_GetSpaceParamFO(hSpace, inStrParam):
    return (BOOLEAN, outStrResult)

Parameters

hSpace HANDLE Handle to the Space object.
inStrParam STRING The Space param value. "1" for Space Type. "2" for Space Name. "3" for Space Number.
outStrResult STRING The result.

Example

To use the sample you need to have a selected Space object on the drawing.

VectorScript

PROCEDURE Test;
VAR
	hSpace	: HANDLE;
	ok		: BOOLEAN;
	res		: STRING;
	
BEGIN
	hSpace	:= FSObject( LActLayer );
	if ( hSpace <> nil ) then
	begin
		{We suggest the handle is a handle to Space object.}
		{Additional verification could be done.}
		
		{Get the Space Type}
		ok	:= IFC_GetSpaceParamFO( hSpace, '1', res );

		{Get the Space Name}
		ok	:= IFC_GetSpaceParamFO( hSpace, '2', res );
		
		{Get the Space number}
		ok	:= IFC_GetSpaceParamFO( hSpace, '3', res );
	end;
END;

RUN(Test);

Python


Version

Availability: from Vectorworks 2017