Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by SLFY

  1. Awesome. That is about what I assumed, but I haven't had time to experiment yet. This helps a bunch. Thank you. Sean
  2. I about peed my pants when I discovered the new excel functionality in 2021, while writing a new script. However I am having a hard time finding documentation. So, this may be answered somewhere already, but I haven't found it. I'm wondering if someone can explain how Vectorworks works with Excel files, and what what excel capabilities are functional in Vectorworks. I am guessing that Vectorworks is mostly pulling a sheet in, and working with it as it does with native spreadsheets, and then exporting it while keeping excel cell formatting...but any "more complicated" formulas would need to be calculated with the workbook open in Excel, and then reimported?...OR am I wrong? Will an imported excel worksheet recognize named ranges and lookup tables? Will it access cell data from other sheets in the same workbook? like: =Sheet2!RangeA+B12 Will it calculate a formula, like: =Height-IF(Drwrs!Inset_Drw_Front=1,Top_Thickness,0) Even if it is just a much better import and export function I am very tickled with the upgrade...and it would have saved me much time and many headaches, over the years. But, if I can add formulas like this within Vectorworks and get the resulting calculations without opening it up in Excel to update values...wahoo!! Thanks for any info, or a link to where to find the answers for myself. Sean VW 2021 Designer
  3. Thanks Pat, That is the weird part. It creates one pio object (an elevation) on file open. There could be 5 or 10 elevations, all pio created objects with the same script, in the file - all still pio objects that I can modify by changing their parameters - ie: not converted to a group, etc. Sorry if I am only repeating and not making myself clearer here.... It seems to - I would say always, but I can't say I have always paid attention - draw a copy of the first created pio object that is still in the file. It only creates the one copy of the one object. It puts it at the origin of the active layer when the file was saved - design or sheet. The actual elevations I create with that pio are almost never at an origin. If I leave this created elevation in the file, save and close the file with the same layer open, it will put another identical copy on top of the last when I open it again. This created elevation is also being exploded, to use an autoCAD term, into components - not even converted to a group. So what I am left with is a 2D elevation of lines and rectangles, text and loci, that is no longer a pio object in any way. Perhaps even weirder - the dimensions that are part of the PIO wont be there. The objects created will be selected...so that I can simply "fit to objects" to find them and hit delete to get rid of them...EXCEPT the loci (the pio places loci to help when I am snapping to points in the elevation). It is as if it creates copies of the Loci. The copies will not be selected and will be sitting there after I delete the rest, so that I have to select them and delete them separately. I have taken two screen captures to help illustrate. In the PIO Elevation 1.jpg - the orange highlighted lines are the first instance of the pio object created in the file. The upper cabinets are also done with the same tool, but are a different instance of it, and there are several more. The second image is what I get in the file when I open it up...found at the origin of this layer, nowhere near the other drawings nor where the view is set at file open. And the objects are selected. This may be a clue too. I just found that this does not happen if I simply close a file and reopen it. It only happens if I shut VW down and restart it, before reopening the file. I never realized that before. I am happy to give you the script but I am afraid I would need to also provide aspirin for the headache reading through it may cause. It is fairly long, not elegant as I mentioned, and likely poorly annotated for someone looking to figure out what the hell sean was doing. Right now it is a "find, delete, move on" issue - and will stay that way if it doesn't go away when I modify the script. Not a big deal and its only me that has to deal with it at all. I spent more time typing this than deleting the objects has cost me in total. I just hoped someone would say, something like: "I had that happen. I changed X and it went away." But if you are looking for a puzzle, let me know and I will send it along. Thanks again, Sean
  4. I am sure this is something simple, but I can't figure it out. It has happened for several years with this plug-in script over several versions of VW. It is part of a set of scripts that I created for a designer's custom cabinet line. The script reads information from one worksheet, combines that info with info in a second worksheet to draw an elevation of cabinetry. The second worksheet is a fairly large spreadsheet of the designer's "standard" cabinetry and the relevant parameters for each type of cabinet. The first worksheet is the list of cabinets and their sizes for a particular job. I have both a plan section plug-in and an elevation plug-in that read the job specific worksheet rows I set in the object property window, to draw each wall of cabinetry. Other scripts break down the final approved drawings into a spreadsheet of cabinet parts that gets fed to a CNC. To be clear, these plug-in scripts are not elegant. I am a novice programmer on my best day and I have learned a ton since creating them. But all of them have functioned adequately for years. However, the elevation drawing plug-in...always...creates a new elevation when a file is opened in which I have used that plug-in. If I saved and closed the drawing file with a design layer open, when I open the file again, it will place an elevation at 0,0 in that design layer. If I saved and closed the file with a sheet layer open, it will place a full scale elevation over the sheet layout. Two things that make this more strange, at least to me. a) as I mentioned, the plug-in is set so that I specify Worksheet "A", row "X" thru row "Z" - for each elevation (or plan section). So, when I first use the plug-in it will either not draw anything or something incorrect, until I get the parameters correct in the object property window. The weird part is (or perhaps the telling part?), the elevation it creates on file open seems to always be the first elevation it drew with correct parameters, or perhaps a better way to put it, the first elevation it drew that is still in the file. Not the first thing it tried to draw with no or wrong information referenced, but a copy of the first elevation in the drawing. b) this new elevation created at file open is always converted to individual objects, not even a group, by the time the file is fully opened - basically lines, rectangles, loci, and text, in the correct classes - but no dimension objects. It is only an annoyance and I have gotten so used to it that when I open a file, I automatically find the new elevation, delete it and go about my work. But things are changing. I will likely be modifying and simplifying this drawing process, and then creating the CNC files in Microvellum going forward. So I thought I would see if someone might have an idea where to start to look for issues that could cause this. Thanks for any help, Sean VW2020 - Designer - Windows10
  5. Just an update, I finally got around to resetting vectorworks preferences. This appears to have done the trick. On note: The reset procedures don't remind you that by deleting the user / appdata folder, you will be deleting any custom plug-ins and workspace you have created that live in that folder. I did back those up, and once the program was opened and recreated these folders, I was able to move my custom stuff back into its appropriate places with no ill effects. Years ago I had a corrupt workspace file...I'm grateful I didn't need to recreate that this time. Thanks a ton for the help Jeremy, Sean
  6. Ok - I just went back to the new file, and now it won't export my image either. Not sure why it worked before. But I am back to a reset...maybe over the weekend. Thanks again, Sean
  7. Thanks Guys. I appreciate the continued diagnosis. Common textures - There are likely a dozen, maybe 2 dozen, in the files that are common, of course, because they are both from the same template. But of those I can only think of one that I use a bunch - a "porcelain" texture I often use for a floor when I am rendering a furniture piece - and is what I applied to floor in the file you checked out for me. But, I don't think I had used that texture for anything in the first file that had issues, and I DID use that texture in the most recent file that is working fine. But you have me thinking...the most recent file that does not have any issue is for a different client, and a new file setup. I can't remember, but I may not have used a common template file to start. Hmmm.... Thanks Pat - but as for the objects at a distance...well I won't say there isn't. I often find that I assumed there was a glitch and a tool didn't work, and so reused the tool, only to find out later that it had placed my object way off my screen. But both files have issues with viewports on sheet layers, setup through cameras, which render fine on the screen. Any regeneration issues would not, I DON'T THINK?, affect my image export. I usually export using a marque selection, setting the px/inch number to the resolution I have set for the sheet the viewport lives on, paying attention the the pixel count numbers next to my cursor as I select what I want to export, and entering that number into the corresponding pixel dimension input box of the export window, and save. As long as I put in the correct pixel number or smaller, from my selection box, it always exports immediately without regenerating anything. Done it a thousand times. (I do wish VW would automatically enter the same pixel dimension numbers from my selection box - it always shows a significantly lower number regardless of when I change the px/inch number. But that is a different post.) But I get what you are saying. I just about had a coronary last week, as I am relearning AutoCAD after 15 years of seeing the light with VW. My published AutoCAD drawings were showing up blank...hours of futzing around...until I realized that when I had brought in a block onto the paper space, it came with a bit of text I didn't see, which went a mile away when I scaled the part i was after. AutoCAD, in its infinite wisdom, did not try to just print the sheet I had so painstakingly set up in the paper space, it was trying to print everything in that paper space. The scale of 1:1 I set meant I was getting a paper sized bit of the nothing midway between my sheet and that bit of text. I will look into this more as I go back into these files, and I may try to purge my template file for the client with the issues, and start the next job from scratch or close to it. If I learn anything I will post it. Thanks again, Sean
  8. Sorry Missed the second post. I do keep workspaces and plug-ins synced between the two computers. I don't remember what else gets sync'd but I have most of the other settings, etc. set to be ignored by the sync program - but who knows. There could easily be enough there to be why they both have the same issue. I just wish I knew what caused the issue in some files but not all. So far it has affected two files but not the most recent. If it becomes more prolific I will do the reset. Thanks again for following up. Sean
  9. Thanks Jeremy. That helps. I will keep the reset in my back pocket. Right now I am in yet another file with a model that is rendering, publishing and exporting normally. It is very strange. Thanks again, Sean
  10. Sure. There isn't anything too special about it. Thanks, Sean Credenza.vwx
  11. Thanks for continuing to look into this. I keep updated on service packs generally - on 2020 sp 3.1 build 537701 You had me excited regarding the compression type - but the default compression is still PNG. Not something I have ever changed, but thought maybe I did on accident somehow. I also gave exporting the image as a PNG rather than a JPG a shot, since I wasn't sure I had tried that...but it still comes out as a blank file. Thanks again, Sean
  12. Just to clarify...I am not able to EXPORT an image, nor publish a rendered image. The image is rendered correctly in a viewport in a page layout. This has happened to me in two different files now. I am not saying it is a vectorworks issue in general. It may be something in the files or something on my end. It has only cropped up recently. This is why I asked if I was the only one having the issue. But it is happening on a Windows 10 Desktop with an AMD processor, as well as a Windows 10 laptop with Intel core i7 processor. I have tried color, black and white, different PDF writers, and, again, simply exporting the image. And. again, I can export the file to a VW 2019 version, open it in that, render the image and export or publish with no issues and no other changes...no scale changes, nothing. So if someone else has these issues, maybe it is a vectorworks thing. Until that happens, I have to assume it is me or my setup, and I have the work around. I don't generate images all that often, so it isn't a huge deal - just an annoyance. But thanks for following up. Sean Screen capture of a Published PDF in the PDF program: And note, the image shows blank in Vectorworks as it publishes the pdf, then reappears after the pdf is created. It isn't a viewer issue. Screen capture of the sheet layer with the rendered image.
  13. Has anyone had an issue with being able to export an image in VW2020? - up to date with service packs. In 2020 the exported image, and the image in a published PDF page were blank - no error messages, or anything out of the ordinary. It generates the rendered image on screen as expected. This may still be some setting or something that I haven't figured out, but I restarted VW, I restarted the computer. I checked for an object in front of the image, layer and class visibility settings. I opened a different file with a model and I can export images of it fine. I couldn't figure it out. I finally saved the file back to 2019, and was able to open it in 2019 and export the same image / publish the image, with no changes other than a viewport update - no problems. The file with the issue is different only in that much of the rendered image is actually image props. The model is just a simple sculpture base. the sculpture itself and background are all image props. I found my work around. I just thought I would see if it is likely just something with my file, or if it is more common. Thanks, Sean
  14. Ha! Well only one of the ships was in the fog. If I would have ever given it a thought, I would have realized that amount of data that would be required for a large 4K screen would be massive. Duh. Guess the moron who's big screen TV is a 10 year old 32" should keep his mouth shut on resolution. So I now see why you feel the monitor size is important for full use of the 4K - thanks. However, my point still stands. My newest monitor is a 17" 4K (laptop)...and now that I have used it for a while, when I go to replace my other 2K monitors they will be replaced with 4K regardless of the size I feel I can afford / have room for. In my mind there is a definite benefit to the resolution when I am working - not night and day, but a benefit.
  15. I hope we aren't two ships passing in the fog here..but I don't understand how a larger monitor helps with making use of the 4K resolution. The pixels per inch does not change regardless of how many inches big the screen is. Any 4K monitor is going to show a resolution that is higher than you can functionally work. Again the advantage is the detail you can SEE in the 4K monitor. If I could take a 4K resolution screen shot of my 4K screen, and opened it on a 2K screen, in such a way that all the pixel were showing, it would take up roughly twice as much screen in both directions.
  16. Hmmm. Windows scaling doesn't change my screen's resolution - it is still 4K. The scaling just changes the number of the pixels used for text, icons, etc. and, i believe that those things need to be of a certain size to be usable, regardless of screen resolution. And so does the size of objects you are snapping to. When I zoom out, I see more detail on my 4K monitor than I do on my other monitors - I don't lose line weight nearly as quickly, etc. So the 4K helps me visually...BUT...I can't use much of that resolution to actually work. And so perhaps that is what you mean by "working area" - and I would agree that functionally, the 4K monitor does not help my actual work flow a whole lot. I still need to zoom in to make the area I am working on large enough to accurately click and snap - and the amount of screen required to do that didn't change much regardless of the screen resolution - it has more to do with user interface accuracy. And in fact, I was at first regretting spending the money for the higher resolution monitor, because I thought I would be able to have more on my 17in "desktop". But, as I mentioned, I have gotten very used to the resolution, and I miss it when I am working on my larger older monitors, because details don't look as crisp and clean, etc. Is my 4K twice as clear as a 2K monitor. No. Is it more clear. Yes. Am I glad I have the 4K screen 6 months in. Yes. The closest analogy that comes to my mind is getting a new eye glass prescription after a year or two of growing older. I can still see fine with the old prescription, but...
  17. I run VW often on a 17" 4K Windows 10 laptop. I have the Windows display scaling set to 225%. Most everything works great and I am getting used to it to the point that I miss the resolution on my desktop monitor. The general display scaling setting is really just changing the size of the text and icons on the screen. I still get a benefit in the 4K resolution in the drawings I am working on. The only real issue I have with vectorworks is the size of the radio buttons in the object info pallet - they are very small and somewhat tedious to hit on the 4k monitor, and I have not found a way to scale them up without over scaling everything, but I have gotten used to it. Other applications vary. Some - mostly older software I have not upgraded - are not "resolution aware". I occasionally use an Adobe CS4 suite, for example. The photo I am working on looks great on the screen, but the tool pallets and menus were initially very, very, VERY small. But, I have found a work around in the program specific windows settings for almost everything where I needed to adjust the scaling different than what windows was doing. The only issues I have now are...I guess you would call them "sub programs" or other windows that open up within a program. Some of those windows open up and are not resolution aware, even though the main application is, which results in weirdness, or "teeny tiny-ness". But this is usually just things like help windows, message windows, etc. so not a real big deal. S
  18. I have found what appear to be a couple changes in the publish dialog that are, so far, just annoying - but I am wondering if there is a better way around them that I am missing? I publish PDF's in black and white, but I work in color. Two things have changed with the publish dialog in the 2020 version of VW... 1) when I add sheets to the publish side (while working in color) it shows them as ready to publish in color, like it always has. However, I used to be able to click on the first sheet in the list, hold shift and click on the last sheet, and change them all to B/W with another click - 3 clicks no matter how many pages. Now, I have to click on each sheet's color setting, then click on a little drop down menu to select B/W. Usually 3 clicks per sheet. A time consuming process when there are more than a few pages to be published. The obvious work around is to change the preferences to display black and white before going to publish (I have a scripted "document context menu" short cut), I just have to remember to do this before opening the publish dialog. I am wondering if there is a different way to do this...or? 2) I have always exported generated model images, and then re-imported those images onto my sheet layers. Doing this, not only saves a lot of model regeneration time as I work and add or change things, and other advantages, but it also always USED to allow me to publish a PDF with a B/W sheet border and other drawings, but a full color model image. My client could look at the full color version on their monitor, their printer converted the images to grayscale, or if they print in color, the dimensioned drawings would still be in black and white as they prefer. It has served me well for years and years. In the 2020 version, however, when I publish in B/W those imported color images are changed to gray scale in the PDF. So, unless I am wrong, I now have to publish the model image pages in Color...which means all my annotations, sheet border, other drawings, etc. are in color. When my client goes to print, those colors go to grayscale. So, now the border and other drawings and dimensions look very different, even hard to read depending on the color I use, especially when compared to the other sheets in the PDF. The only option I have come up with, is to modify my sheet border from colors to all black and white...which I can do, just an announce. But that doesn't allow me to put a color image on the same sheet with a black and white line drawing. So if I want to add a color model image, it has to be on its own sheet. I REALLY don't want to change all my classes to black, or even change the properties of the drawings on the same sheet as the model to be black... Am I just missing something here? A simple example of what I find I can no longer do, is below. A bit of a side note - 20 years ago when I worked in AutoCAD, the publish set up would allow me to set the print preferences for each class (Actually AutoCAD layer). This allowed me to print the entire drawing in black and white, but, say, print dimensions in color - different colors for different dimension classes (layers), regardless of what I used for color when drawing. This allowed the viewers to quickly determine the dimensions of different types of objects in the same drawing. Using something like the example below, I used to show door dimensions in one color for one cabinet maker, and box dimensions in another color for another cabinet maker. I added this to the VW wish list a couple times 12 or 15 years ago. I forgot about it because this client went to a black and white laser printer when their plotter died. But, it would solve both of my problems here. All I would need is a class for imported images, or even viewports, set to print/publish in color, and I could set all other classes to print/publish in B/W. There would be no need to change the setting of each page in the publish dialog each time, no unexpected grayscale images...There are only a couple of "tools" AutoCAD had that I have always missed in Vectorworks. That is one, and one I have never found a good work around for it. Vecrtorworks Designer 2020 Windows 10 Thanks, Sean
  19. This may have been posted before, I am not sure of the best way to word it. It would be really helpful if the script error window included the script name in the title bar. Obviously when you are creating a script, you know which script has the error. However, when a new version of Vectorworks comes out, and functions have been deprecated, etc., I will import an existing file to the new version, and I will get the script error window showing me what is no longer valid and where it is in the script... That is to say - short of taking the time to edit it on the spot using the edit button. I would just like to take note and fix it when I have time. Thanks, Sean
  20. Sorry Orso, I quickly read part of your reply in an email that popped up on my phone just as I was about to hit send on the example scripts. I didn't refresh the web page to read it before submitting, because I was afraid I would lose what I had ready to post. I only added that first line to my post. In that quick, small screen email scan, I read the comma between the two functions in that sentence as you including both as handling dimensions. Later I read your reply more completely. I took your recommendation and changed the function name, and decided to leave it in my scripts to include as needed. Rather than 0, I set the default - fail / error value to something very odd - I used 6.66mm - with a note to remind me. This way something will be drawn, but to the wrong size, if I ever use the Function in a script with a unit typo. Knowing how I think (or don't, obviously), nothing showing up is much harder for me to troubleshoot than figuring out why it is the wrong size. I also added a message to notify me of the error, but I use enough messages in some scripts that it may well be over written before I notice it. Sorry. But the added documentation for Labels was the intent of my post - and I still think a little more space should be provided to address the rules of using them - where they are to be declared, do not declare labels not being used, and that separate labels can be used in subroutines and perhaps an example that shows that. Again, in hindsight, this seems obvious, but until I saw an example of it, I don't think it would have occurred to me as a possibility. I still don't have any clue why I need to include a Label declaration in the user defined function within my long script, when I don't in others. This has me a little worried going forward with the evolution of this script and wondering if it is a different issue that I am unaware of still. Will a new vectoworks version expose the issue? Will I have trouble breaking it up into sub routines that I can use in other scripts as I plan? Cross those bridges if they ever come up I guess. For now it works. Sorry again Orso and thanks for your help, Sean
  21. Just saw the reply you gave as I was sending in my example. Good point. I will rename the user defined Function Str2Dim - so that I can include it when needed without messing with the original. Thanks, Sean
  22. Hi Again Orso, Again, I am the novice here, BUT...I believe you are wrong about the Str2Num Function that is built in to Vectorworks. If I include unit marks in the string, I get no result. If I add the user defined Function from the devoloper page above, it works as I need. Here is a screen capture of the Parameters of a test script I created, which includes the needed unit marks in the strings: This Script, using the built-in Vectorscript Str2Num Function results in nothing being drawn, regardless of which input choice I select: This Script, with the added user defined Str2Num Function works as expected: On the other hand, I have not been able to repeat my issue with the compiler registering errors on my GOTO Labels. I can add a label and a IF THEN GOTO _ to this script, but not the user defined Function and I get no compiling errors. So, my comment that "if you have labels in the main script you also HAVE to have them in any sub routines, etc. appears to be false...except in the case of my much longer script...so I guess I will go back to banging my head if I have other issues when I finalize that tool. Thanks again, Sean
  23. Thanks Orso. On the developer website it stated that Str2Num will not handle units, and this version of the function will...as I am adding both imperial and metric dimension choices to my dialog box, I need to be able to carry the units through. I haven't gotten to the point I have checked if that will in fact work in the existing str2num function. When I originally developed this vectorscript tool, I used the "dimension" input because I didn't want to try and figure out how to make a "string" input conversion work for both imperial and metric...I work in, and need to use both regularly, and in the same drawing file. As for using LABELs...this is syntax that may not be neat and eligant, but it is very simple for me to understand and follow and that goes back to my 30year old basic fortran training. I understand the potential problem of where you are going to...but it is very easy to follow the go-to statements through the script and find an issue. Follow the bouncing ball so to speak...might be time consuming on large scripts but simple to understand for my non programmer mind. I have never had errors in my compiled script that I wasn't able to diagnose pretty easily. And understand that I consider myself a novice but I have created twenty or thirty "tools" in vectorscript that I use on a daily basis. Some are 12years old and have grown as I add functionality. Perhaps 6 are 1000 to 2000+ lines of code, including this one. I do use "case of" when it makes sense, but, off hand, I can't begin to image how to do what I have some of these tools doing without using at least some LABELs. Some of my "inputs" will require going through 3/4s of the script, others may only go through the first 1/8th but then jump ahead to use the middle 1/8th and again for the last bit, etc. So my suggestion stands for the User Guide, if not reinforced. Please add the extra information, or more accurately, complete the information on how to use Labels. Reinforce the encouragement to use other methods if you like. Thanks Orso, Sean
  24. I will preface this by saying that to the extent I can write scripts, I am self taught. I had one Fortran class in college in the mid 80's. There is very little information about LABELS in the Vectorscript user guide that I could find, short of what it states in the GOTO statement section. And it is not easy to find info online for Labels in Pascal...not that there is much info needed: must be declared, where / how to declare them, do not declare labels not being used, AND a couple other little tidbits... I just spent HOURS learning that if the main procedure script uses Labels, then user any user defined functions / sub-routines ALSO HAVE TO USE LABELS...even if it is just 1 label for 1 statement. If I am mistaken please let me know, so that I can go bang my head on a wall again. ---- I am modifying a relatively large (for me) script and added a user defined function to replace the Str2Num function as suggested on the developer page http://developer.vectorworks.net/index.php/VS:Str2Num. I was changing the input from a dimension type to a popup (showing / limiting options to the dimensions available) ...and needed to be able to get the input back into dimension form. The script compiled fine before adding the user defined Str2Num function...however, after adding it, I continually got errors regarding the LABEL associated with every GOTO statement in my script. After much before mentioned head banging, experimenting and googling. I found an old website for pascal that gave a little more information about Labels - stating "Line labels defined within a procedure are exclusive to that procedure", and it gave an example showing Labels in the main and sub sections . This information didn't solve my problem, but it did eventually ring the very small bell my head...."Do I need to add a label to the user defined function?" No idea WHY this would be necessary but I have tried everything else. So: FUNCTION Str2Num(str :STRING) :REAL; Label 1; Var num : Real; BEGIN 1: Str2Num := 0; IF ValidNumStr(str, num) THEN Str2Num := num; END; And it compiles without any errors regarding the Labels in the main procedure. So not only do I think there should be a blurb about the possibility of adding separate labels to sub routines / procedures/ user defined functions within a main procedure or $INCLUDE files, it should state that you HAVE to use labels in those sub routines if you use them in the main procedure. Again, if I am wrong please let me know, and where I screwed up. Now I will have to see if it actually works. 😉 Sean
  25. Hmmm- maybe this is a Windows version thing? or is it a 2018 version issue? I have not upgraded to 2019 yet. The only way I have found to move through is to click on "next" or "prev"...takes a while to get to pages, say, 28 thru 32 this way.
  • Create New...