Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by relume

  1. Hello It seems that the command "FindObjectAtPt_Create" works only for objects on the active layer. The options for object selection, although not documented, are analogous to those of the command "ForEachObjectAtPoint" http://developer.vectorworks.net/index.php/VS:ForEachObjectAtPoint best regards,
  2. Hello Does anybody have a working example for the command "FindObjAtPt_Create" ? I am not able to get the command group "FindObjAtPt_..." to work. Either it is not clear, if the command works across layers. The following example get the actual user cursor, then shows X, Y and then should return the handles for all object within the specified radius of the given X, Y point. For my test drawing the X, Y is returend correct by the command GetPt(X,Y) but FindObjAtPt_Create does not find any object although there are plenty of test objects (also overlapping and distributed on the same and other layers) on my test drawing. PROCEDURE ObjectInRadius; VAR cnt, i : INTEGER; startContainer : HANDLE; list : LONGINT; loc: VECTOR; vX : REAL; vY : REAL; vObjectHandle : HANDLE; BEGIN dselectall; startContainer := NIL; GetPt(vX, vY); AlrtDialog(Concat('X/Y : ', vX, '/', vY)); list := FindObjAtPt_Create(startContainer, 0, 1, vX, vY, 15); cnt := FindObjAtPt_GetCount(list)+1; i := 0; WHILE i < cnt DO BEGIN vObjectHandle := FindObjAtPt_GetObj(list, i); SetSelect(vObjectHandle); AlrtDialog(Concat('Handle : ', vObjectHandle)); i := i + 1; END; END; Run(ObjectInRadius); @VectorWorks Support. Please document and comment this command, also with working examples on the vectorscript function reference.
  3. Hello Please update all vectorscript command function references (http://developer.vectorworks.net/index.php/VS:Function_Reference) by the appropriate phyton syntax together with an example. For instance the syntax to vectorscript command HCenter is very different in python. HCenter(h, x, y) versus p = HCenter(h) # where p = (x,y) Why has somebody to guess the correct python syntax? Thanks an best regards,
  4. Hello with some best guess tryings I a found that the following python syntax works for vs.HCenter: vPoint = vs.HCenter(vObjectHandle) Thereby the returned vPoint is of the pyhton data type tulple of the form (X,Y) and the single values can be accessed by the form of: vX = vPoint[0] vY = vPoint[1] best regards
  5. Hello I may have a stupid question about the correct syntax of the vs.HCenter command in pyhton: In vectorscript HCenter works the following: vObjectHandel : handle; vX = real; vY = real; HCenter(vObjectHandel, vX, vY); In python I am calling the HCenter method in the analog form: vs.HCenter(vObjectHandle, vX, vY) Executing the python script I receive for vX und vY the error "NameError : gobal name 'vX' is not defined" for the call of vs.HCenter. If am writing the following: vX = 0.0 vY = 0.0 vs.HCenter(vObjectHandle, vX, vY) The previous error is gone but vX und vY remains always 0.0 and never gets the values from the object referenced by the vObjectHandle passed as the first parameter to vs.HCenter. Many thanks for any hint, best regards
  6. Hello We are using multi stamp objects that reference "drawing" objects to label them. By scripting we want to find from every multi stamp object the object it references. Best would be the corresponding object-handle. With GetRField('Stamp CW', ... ) we can get all defined fields in the database 'Stamp CW'. The field 'LinkWithObject' hold only a text value "linked with object". Unfortunately the field 'LinkWithObject' does not contain no more information about the linked object nor there is no more database fields accessible. Is there an other option to get the object handle of the linked object? Many thanks in advance,
  7. Hello Thank you very much. Exporting up to 600 cutouts and manually type the filename on every exported file is a an issue :-) looking forward for a possibility to circumvent this approach.
  8. VW 2014 Hello We have to export automatized by a vectorscript a batch of small cutout plans to a raster image format like tif or jpg. Until today we did the export to PDF files. As VW 2014 gives us some problems on the PDF rendering in the export and the export to a raster image format does not, we would like to adapt our existing vectorscript. In our vectorscript we used the PDF functions like this: # START of the script : reading the PDF-Settings once AcquireExportPDFSettingsAndLocation(TRUE); # Start Loop : loop all cutout plans and export to independent files OpenPDFDocument(vMyFileName1ToN); ExportPDFPages(vMyFileName1ToN); ClosePDFDocument; # End Loop For exporting to a raster image file format we are looking for a vectorscript function/command that is analogue to the ones for PDF-export. It is really true, that there is no similar vectorscript function despite in the VectorWorks Menue /File/Export/Export to image.. the functionality is given? Many thanks for any hints, best regards, relume
  • Create New...