VS:IsGeoreferenced: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 25: | Line 25: | ||
hLayer | hLayer | ||
HANDLE | HANDLE | ||
Pass NIL for Vectorscript and None for Python if you want to manage the document. | |||
</line> | </line> | ||
</lineList> | </lineList> | ||
Line 34: | Line 34: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<sample></sample> | <sample> | ||
==== VectorScript ==== | |||
<code lang="pas"> | |||
PROCEDURE Test; | |||
var | |||
isGeoref: BOOLEAN; | |||
BEGIN | |||
RemoveGeoref(NIL); | |||
isGeoref := IsGeoreferenced(NIL); | |||
if (isGeoref) then | |||
AlrtDialog('The file is georeferenced.') | |||
else | |||
AlrtDialog('The file is not georeferenced.'); | |||
end; | |||
run(Test); | |||
</code> | |||
==== Python ==== | |||
<code lang="py"> | |||
vs.RemoveGeoref(None) | |||
isGeoref = vs.IsGeoreferenced(None) | |||
if isGeoref: | |||
vs.AlrtDialog('The file is georeferenced.') | |||
else: | |||
vs.AlrtDialog('The file is not georeferenced.') | |||
</code> | |||
</sample> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
Latest revision as of 11:39, 27 March 2024
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Check if the layer is georeferenced. Pass NIL to check the document.
FUNCTION IsGeoreferenced(
hLayer :HANDLE) : BOOLEAN;
def vs.IsGeoreferenced(hLayer): return BOOLEAN
Parameters
hLayer HANDLE Pass NIL for Vectorscript and None for Python if you want to manage the document.
Example
VectorScript
PROCEDURE Test; var isGeoref: BOOLEAN; BEGIN RemoveGeoref(NIL); isGeoref := IsGeoreferenced(NIL); if (isGeoref) then AlrtDialog('The file is georeferenced.') else AlrtDialog('The file is not georeferenced.'); end; run(Test);
Python
vs.RemoveGeoref(None) isGeoref = vs.IsGeoreferenced(None) if isGeoref: vs.AlrtDialog('The file is georeferenced.') else: vs.AlrtDialog('The file is not georeferenced.')
Version
Availability: from Vectorworks 2012