Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by matteoluigi

  1. Num2Str should do it with EINZW as REAL Number...
  2. works nearly fine, however SetWSCellFormulaN only works with Strings or Char - Variables. I'd like to insert an Integer-Value. How could I do that? Is there any possibility to transform an Integer-Value into a String? Or feed a String-Variable with Integer-content? EINZW: INTEGER; inString := EINZW; SetWSCellFormulaN(worksheet, zeile, 2, zeile, 2, inString);
  3. Hi, does there exist any possibility to write data from a Vectorscript-Script directly into an existing Vectorworks-worksheet? I didn't find a corresponding command. (maybe because the command doesn't exist) Alternative would be using "runscript" directly from the worksheet. Therefor I need to read out column A and insert it as variable in the script. (For example - A1: 1 -> "there are x 1-room-apartments")
  4. yeah, thanks, I got it all running, now 🙂 Now I would like, to write my results in a worksheet. Still working on it (and maybe thinking about running the script within a worksheet) {In this script, I count a) how many objects are connected with the database "Wohnungsnummer" (number of flat/apartment) b) in a for to loop i do loop through all apartments (in fact the loop runs as often as many rooms are in the building, not as many apartments, but, that's not my main priority) - every loop the script counts the number of rooms which are living rooms, rooms or workrooms (it's the way you define flats in germany, a 3 room flat for example consists of a kitchen, a bathroom, a corridor, a living room and two sleeping rooms, you only count the living room and both sleeping rooms)} PROCEDURE zaehlen; VAR NR: INTEGER; {counter for the running loop} ANZAHL: INTEGER; {number of all rooms} ZANZAHL: INTEGER; {number of rooms of the actually checked apartment} EINZW: INTEGER; {number of all 1 room-appartments} ZWEIZW: INTEGER; {number of all 2 room-appartments} DREIZW: INTEGER; {number of all 3 room-appartments} VIERZW: INTEGER; {number of all 4 room-appartments} FUENFZW: INTEGER; {number of all 5 room-appartments} BEGIN ANZAHL := COUNT(((('Wohnung'.'Zimmertyp'='Zimmer')|('Wohnung'.'Zimmertyp'='Wohnen')|('Wohnung'.'Zimmertyp'='Arbeitszimmer')))); {EINZW :=0; ZWEIZW :=0; DREIZW :=0; VIERZW :=0; FUENFZW :=0;} FOR NR:=1 TO ANZAHL DO BEGIN {Schleife, die alle Wohnungen "durchläuft" } ZANZAHL := COUNT(((('Wohnung'.'Whg-Nr'=NR) & (('Wohnung'.'Zimmertyp'='Zimmer') | ('Wohnung'.'Zimmertyp'='Arbeitszimmer') | ('Wohnung'.'Zimmertyp'='Wohnen'))))); {Zählt, wieviele Zimmerin der Wohnung sind mit der Wohnungsnummer NR.} IF (ZAnzahl=1) {erhöht den Einzimmerwohnungs-Zähler um 1, wenn die Whg ein Zimmer hat.} THEN BEGIN EINZW := EINZW+1; END; IF (ZAnzahl=2) {erhöht den Zweizimmerwohnungs-Zähler um 1, wenn die Whg ein Zimmer hat.} THEN BEGIN ZWEIZW := ZWEIZW+1; END; IF (ZAnzahl=3) {erhöht den Dreizimmerwohnungs-Zähler um 1, wenn die Whg ein Zimmer hat.} THEN BEGIN DREIZW := DREIZW+1; END; IF (ZAnzahl=4) {erhöht den Vierzimmerwohnungs-Zähler um 1, wenn die Whg ein Zimmer hat.} THEN BEGIN VIERZW := VIERZW+1; END; IF (ZAnzahl=5) {erhöht den Fünfzimmerwohnungs-Zähler um 1, wenn die Whg ein Zimmer hat.} THEN BEGIN FUENFZW := FUENFZW+1; END; END; CreateText(Concat('Da sind ', EINZW, ' Einzimmerwohnungen, ', ZWEIZW, ' Zweizimmerwohnungen, ', DREIZW, ' Dreizimmerwohnungen ', VIERZW, ' Vierzimmerwohnungen und ', FUENFZW, ' Fünfzimmerwohnungen.')); AlrtDialog(Concat('Da sind ', EINZW, ' Einzimmerwohnungen, ', ZWEIZW, ' Zweizimmerwohnungen, ', DREIZW, ' Dreizimmerwohnungen ', VIERZW, ' Vierzimmerwohnungen und ', FUENFZW, ' Fünfzimmerwohnungen.')); {Gibt aus, wieviele Wohnungen welchen Typs im Haus sind.} END; RUN(zaehlen);
  5. @Pat Stanford does there also exist sth like else if?
  6. thanks for your great help. Where can I find instructions how to use an if-clause in vectorscript?
  7. @JBenghiat yeah, herbieherb already told me in the german user board 😉 I think about it. first i thought, I would feel more familiar with vector script, because I already have been coding in Vectorworks worksheets for a couple of years... however, just putting a "vs" in front is ok for coding python. great alternative, i guess, and of course keeping in mind that with marionette there exists a third alternative (which also includes python codes in its nodes)
  8. sure, that's right... (as a counter it should be supposed to be an INTEGER Number of course... 😉 ) thanks in https://developer.vectorworks.net/index.php/VS:AlertInform is written: text. STRING The information to be displayed. advice STRING The text to be added in a smaller font under the main information message. minorAlert BOOLEAN The severity of the alert: minor(true) or major(false). however, thanks 🙂
  9. Hi, I want to learn Vectorscript and actually not that bad (i think at all). I already have been coding a little bit C, C++, Basic, Pascal and PHP in my life (also it's 15 years ago 😉 ) but, however, I know a little bit about functions, procedures, variables, variable types... my skills only got a bit rusty. However I also did work in Vectorworks worksheets and regained a part of my forgotten skills, somehow. Actually I am struggling with some basics and sometimes I don't understand, what the compiler really wants to tell me... (PLEASE don't tell me, I could solve the issue of the script with a worksheet more easily... It's just a first try, let's say, a proof of coding skills. what's wrong with that code?? Line #10 BEGIN {Error: Expected BEGIN} {Error: Expected a RUN statement at the end of the script} There's a "RUN statement at the end of that script... Line #14 AlrtDialog('AlrtDialog'); { Error: Expected a string or char. } or { Error: Expected the assignment operator := } or { Error: Dod not expect this after end of statement - missing ;? } I mean, c'mon, I am copying the commands from the developer-wiki and still they are wrong? What's wrong about: There's the "PROCEDURE"-command and name in the beginning. followed by "BEGIN", "END;" and "RUN"(Name) sometimes I think compilers must be female... I don't understand them
  10. hmm, but, the empty OIP-Problem isn't a well known issue at VW inc.? I am wondering, because it's happening so regularly, independently of any file. Resetting the user folder helped only for some days... strange thing.
  11. no, it would be better, really hiding them, for example for dwg-exports
  12. For drawing plans for modification of buildings, data Data visualization should be able to hide objects, too. In Archicad for example it's called Rennovation filter. Here you can assign to an object, wether it is existing, new or should be demolished, in order to display all parts in the colors - black:existing, yellow: demolished, red: new or display only the old version or the new version of the building. However, data visualization actually isn't able to hide objects, which is essential for those plans. Here you can see, how it is solved in Archicad: is
  13. Hi, just take a look at the german resource manager (screenshot). The order of resource types is the order of the english resource types, not the alphabetical order of the german ones... This issue is as old as, Vectorworks? 10years +x? s
  14. great thing, however, somethings not working in the script. What's wrong with the quoted script aheada?
  15. doesn't help. It's not a VW-Spotlight issue, however...
  16. thanks, I will invest a few more minutes in searching and post a link to the result, as soon as I got it 😉
  17. Hi, im working with VW 2020 SP4, German, Architect. It happens sporadically, mainly after switching between more applications, that the object infopallette suddenly does show any object parameters only when I click into the text-fields. The only solution I know is resetting the VW 2020 user-folder. Is there any known issue? I never experienced anything like this before during the last 10 years (and I've been working myself in the German Vectorworks helpdesk-team for about 5 years)
  18. sure, but there are still more users working in the same project 😉. However, I think, we're losing the main topic of this post. Migrating and referencing storey-heights from one project (either from a simple vwx or a project-sharing-project) would be a very useful thing!
  19. I only said, that referencing lost a little importance in Vectorworks since project sharing somehow. (for reasonable thoughts of course) however, both, project sharing and references are useful tools, in my opinion.
  • Create New...