Difference between revisions of "VS:CreateWSImage"

From Vectorworks Developer
Jump to: navigation, search
(add link to other routine)
(fix typo)
Line 38: Line 38:
 
([[User:Orso.b.schmid|Orso]], 2015.06.20): It is possible to have any number of worksheet images on drawing, each on a different location. But be warned: if you use this routine AND already have some images of the chosen worksheet on drawing, the routine will shift the last created image object, placing it at the chosen coordinates. Very tricky. Even if you try to reset the last created object using [[VS:SetCurrentObject| SetCurrentObject]] CreateWSImage will shift exactly the one which was created first.
 
([[User:Orso.b.schmid|Orso]], 2015.06.20): It is possible to have any number of worksheet images on drawing, each on a different location. But be warned: if you use this routine AND already have some images of the chosen worksheet on drawing, the routine will shift the last created image object, placing it at the chosen coordinates. Very tricky. Even if you try to reset the last created object using [[VS:SetCurrentObject| SetCurrentObject]] CreateWSImage will shift exactly the one which was created first.
  
You must check for the presence of other worksheet images [[VS:GetWSImage| GetWSImage]] before trying to create a new one and duplicate one of the found sets at chosne coordinates instead of creating an image.
+
You must check for the presence of other worksheet images using [[VS:GetWSImage| GetWSImage]] before trying to create a new one and duplicate one of the found sets at chosne coordinates instead of creating an image.
 
</remark>
 
</remark>
  

Revision as of 03:45, 20 June 2015

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

Description

Creates an in-document image of the specified worksheet. The specified point location is the top left corner of the image object.
FUNCTION CreateWSImage(
worksheet  :HANDLE;
locationX,locationY  :REAL) : HANDLE;
def vs.CreateWSImage(worksheet, location):
    return HANDLE

Parameters

worksheet HANDLE Handle to worksheet.
location REAL X-Y coordinate location of image object.

Remarks

(Orso, 2015.06.20): It is possible to have any number of worksheet images on drawing, each on a different location. But be warned: if you use this routine AND already have some images of the chosen worksheet on drawing, the routine will shift the last created image object, placing it at the chosen coordinates. Very tricky. Even if you try to reset the last created object using SetCurrentObject CreateWSImage will shift exactly the one which was created first.

You must check for the presence of other worksheet images using GetWSImage before trying to create a new one and duplicate one of the found sets at chosne coordinates instead of creating an image.

Version

Availability: from VectorWorks 9.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox