Jump to content

matteoluigi

Member
  • Posts

    464
  • Joined

  • Last visited

Everything posted by matteoluigi

  1. It works πŸ˜„ why shouldn't it work, wrapping worksheet-code in a string which is written via python into a worksheet, why shouldn't it work. vs.SetWSCellFormulaN(worksheet,3,3,3,3,"=XLOOKUP(B3; '___'; 'Zimmeranzahl':A1..A11; 'Zimmeranzahl':B1..B11)") -> (XTABELLENSUCHE is the german translation for XLookup. I will never understand entirely why programming functions are translated into german πŸ˜‰ )
  2. Yes, it’s option 2 which I want to achieve. i want to scan space objects for their type to assign them longer text parts which I β€œstore” in another worksheet. one project I have is for example a list of all rooms with one worksheet for every room which of course grows with the building. I already have an idea. Setting a string like vs.SetWSCellFormulaN(worksheet, 2, 3, 2, 3,’=xlookup(A3,…)’ in a worksheet sounds promising (and a little bit naive, too ;-)) i will have a try asap.
  3. Just a quick idea, afaik both functions only exist in worksheets and the 2022 Datamanager. Why not enable VLookup and XLookup functions also in Vectorscript/Python? Could be great... I already could have a use case for that...
  4. 😞 that didn't help I just want to prevent, that the worksheet already exists before I create a new one πŸ˜‰ for a in range (4): # vs.CreateWS('WS_TEST'+a+',2,2') worksheet = vs.GetObject(vs.Concat('WS_TEST',a)) if worksheet not in [None, 0]: vs.CreateWS((vs.Concat('WS_TEST',a)),2,2) vs.SetWSColumnWidth((vs.Concat('WS_TEST',a)),1,1,50) vs.SetWSColumnWidth((vs.Concat('WS_TEST',a)),1,1,20) vs.SetWSRowHeight((vs.Concat('WS_TEST',a)),1,1,20,0,0) vs.SetWSRowHeight((vs.Concat('WS_TEST',a)),2,2,20,0,0) vs.SetWSCellFormulaN((vs.Concat('WS_TEST',a)),1,1,1,1,a) create-ws.zip
  5. did you find any conclusion? actually I tried the following code, understanding that it won't work. However, I want to check wether the worksheet already exists before I create it. if worksheet = nil: however doesn't work with a handle, obviously (and "NIL" doesn't exist in Python) What can I do? switch back to Vectorscript? 😞 worksheet = vs.GetObject('WS_TEST') if worksheet = nil: vs.CreateWS(('WS_TEST'),2,2)
  6. yeah, now i digged out that script, too. Incredible somehow, that there is no "find and replace"-command in Vectorworks-Worksheets ;-D. Like Excel without find-replace... such a pity, that you can't find & replace sub-rows (unfortunately technically unthinkable, imho)
  7. # this script reads out ther first column of a worksheet # in the first column are written all worksheet names which you might want to recalculate # so you can create more worksheets like more sets of worksheets to recalculate (like publisher sets in VW are possible, too) WSSet = vs.StrDialog(β€˜Which set of worksheets do you want to recalculate: β€˜,’’); # for loop, which reads out the first column of the "recalculate set" for row in range (1,10): WSSetH = vs.GetObject(WSSet) WSName=vs.GetWSCellFormulaN(WSSetH, row, 1) # yes, it works ;-) WSNameH = vs.GetObject(WSName) # recalculate a Worksheet vs.RecalculateWS(WSNameH)
  8. I tried a little Python script for that issue (this script recommends at least one worksheet with a series of worksheet names which you want to recalculate in the actual file) # this script reads out ther first column of a worksheet # in the first column are written all worksheet names which you might want to recalculate # so you can create more worksheets like more sets of worksheets to recalculate (like publisher sets in VW are possible, too) WSSet = vs.StrDialog(β€˜Which set of worksheets do you want to recalculate: β€˜,’’); # for loop, which reads out the first column of the "recalculate set" for row in range (1,10): WSSetH = vs.GetObject(WSSet) formula=vs.GetWSCellFormulaN(WSSetH, row, 1) # maybe "WSName=vs.GetWSCellFormulaN(WSSetH, row, 1)" works, too WSName=formula WSNameH = vs.GetObject(WSName) # recalculate a Worksheet vs.RecalculateWS(WSNameH)
  9. ne, es irgendwoanders zwischenzuparken half leider nicht...
  10. Hi, a colleague does have problems pasting text from adobe reader 2021.011.20039 in VW 2021 SP5. He uses macOS 10.14 on a late 2015 27" iMac with 16GB of ram. (as you can see in the screenshot) the pasted text gets scattered somehow in pieces after copying it from a pdf and pasting it in a document. Any experiences?
  11. Hi, every time I try to switch from one field to the other in the Object Info Palette and switch over a radio button or a drop down menu using the tab key the cursor switches to the measure palette next to the cursor (in german it's called "Objektmaßanzeige/OMA). that sucks! πŸ˜‰ PLEASE STOP IT! (last tested in VW 2022 SP2 Build 627588 on macOS 11, MB Pro 16") Bildschirmaufnahme 2022-02-08 um 10.59.37.mp4
  12. @helleMOMENTE addressing sub-rows with GetWSCellString isn’t possible, right?
  13. In Python: Stringvariable =vs.WSScript_GetPrmStr(index) for getting a String variable,….. Does WSScript_SetResStr(resultCellValue) return the value?
  14. Hi, actually I am looking for some help how to make a script run within a Vectorworks worksheet. Actually I know a little about scripting (both Vectorscript and Python) and what I am doing is simple data processing, which doesn't work in worksheets for several reasons. I actually wrote some scripts, which for example count space objects and sum up their are, in order to recalculate it in a new worksheet. However running scripts inside the datamanager sounds quite appealing, so it could be worth a try. Now my simple idea has been, that either if I work in a worksheet or the datamanager, the system must be quite similar 1) in a worksheet for example I create a filter line, which shows me for example all space objects in the drawing or in a specific layer. In Column A I write ='Space'.'11_Occupancy Type' in order to see the text in the corresponding space object record format field. Now I want to hand over that text to a script in column B in order to do whatever I could do with the string from column A. Divide it into substrings, count all Space objects with the corresponding occupancy type and calculate their are,... (sounds quite like it could be possible within the worksheet, but, what I want to achieve goes a little bit further) however a) where can I define that I want to hand over the string from the worksheet cells A-1.1 -> A1.X? b) how do catch that string within the script c) and finally, how do I hand it over back to the worksheet? 2) same about the Datamanager. Let's say, I create a new mapping, which reads out the occupancy type of all space objects and has to count all space objects of the corresponding occupancy type and map the result into a "ifc data field". thanks in advance for your answers. The developer reference was a little bit to short. I didn't find the answer there, unfortunately.
  15. ... sorry for the quick post..., sounds like the datamanager-function must be the same like the worksheet-runscript-function πŸ™Š Now hoping to find sth in the python or vectorscript-board
  16. Hi, I want to use a (potentially python) script within the vw 2022 Datamanager. I don't understand, how to tell, which parameters are handed over from the datamanager to the script and vice versa. I want to read out " 'Space'.'11_Occupancy Type'" in order to count how many rooms the apartment xy does have and how big it is (square meters). That's the quick help text which doesn't really help me a lot:
  17. yes, but worksheets actually can't solve what I want to do. I want to count how many apartments of which entire netto size and of which room number I have. I still didn't find, how to solve that in a worksheet without some "customizations" (Scripts) At all, a worksheet can count how many rooms every aparmtent has and how many square meters it has, too. If I want to count how many aparments of which type a bulding contains, I still have to re refer on space objects. So, writing the room number in a space object, for example with a data tag could be the solution. So, the only reason for that limitation imho could be a performance issue.
  18. Well, the Substring thing in fact wasn't my main Idea, however it was worth a try... And, I made it work πŸ™‚ #WS_TEILSTRING('Space'.'11_Occupancy Type'; '_'; 2)# (TEILSTRING is the German command for SUBSTRING πŸ˜‰ ) my next try is a little bit more advanced, and @Antonio Landsberger from ComputerWorks Germany already told me, that it won't work, and he already placed an Enhancement/Improvement Request (in Jira or somehwere else..., dunno) I want a Data Tag which counts the number of Space Objects with the same Flat/Apartment ID. So I know, how many rooms a flat/apartment does have and how many square meters. I already did sth similar with a vectorscript and python script but, running that script takes about 4-10 Minutes, every time (of course dependent of the project size). So I thought solving sth like this with a Data Tag could be a smart way... (in fact I would have to count the number of rooms, which are either a living, sleeping or working room, but that's more a question of an if query πŸ˜‰ ) However, it's just another aproach, also for getting more and more familiar with the new data tag tool... (I tried counting Spaces with "#WS_ANZAHL('Space'.'11_Occupancy Type')#" (Anzahl of course is the command for counting objects.) Thanks in advance. Data Tag tests.zip
  19. Hi, are there any possibilities to implement a substring and a count function in a VW 2022 Data Tag? Both are worksheet functions, however I didn't find them both in the data tag functions. (I suppose, because the "data tag" Plugin doesn't support them there) typing a substring command manually still didn't work.
  20. imo we need a datamanager subforum here, the complexity of code increased since vw2022 a lot, it's neither 100% Vectorscript, nor Python (more VS but, too specific imho, many VS guys never get in touch with the datamanager however..., although it COULD BECOME a mighty tool for everybody, event designers included...)
  21. it's the third Video from 3, however it's the most interesting, imho
  22. here Tina Draller talks about IFC 4 in the Datamanager, unfortunately in german πŸ˜‰
Γ—
Γ—
  • Create New...