Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by SamIWas

  1. I think the number depends on the alignment of the planets, and it will change over time. I used to have a massive workspace full of custom scripts which made my workflow exceptionally fast. Then somewhere around 2015, workspaces started to break apart if there were too many scripts. Many just wouldn't run. This lasted for years. 2021 seemed to fix it, and I loaded up my workspace again, and it worked well. Then, over time, commands started to break, not work at all, or call up completely random other commands. I've never figured out an actual number. Hopefully, 2022 fixes it, but I'm not holding my breath.
  2. We are the same....I really lament the loss of Message functionality for debugging.
  3. Man...it's been over a month since you posted this, but thank you. I will try this!
  4. I wrote a script which does some spotlight lighting device numbering tricks that the Vectorworks numbering tool does not do. It all works perfectly as intended. But a friend testing it for me says that the instruments updated by the script do not update in the XML file which is used as the data exchange between spotlight and Lightwright. He says a change in the OIP works, changes via the numbering tool work, and changes made via "edit divide" work, but changes made via the script do not. Even after making other changes in the document, instruments numbered only by the script do not update. Is there some kind of syntax which can be used in a vector script to update the field for Lightwright? I do not use Lightwright, so I can't look into it myself.
  5. Thanks guys! I will look into this tomorrow. Seems easy enough..........
  6. So, say I have a script with a dialog where the user can input several values. in this case, let's say it's a pull-down menu. What is the method used so that the next time the script is run, the last-chosen or last-inputted value is populated in the dialog? I'm assuming it has something to do with string definitions or something, but I haven't delved into this yet. Or maybe it's in the parameters? Example: Script is run, and the dialog has an edit box named "Start" where the user enters "100" as the value. The next time the script runs, I want "100" to be in that edit box. Or if they choose "Channel" from a drop down, then "Channel" would be the chosen option next time.
  7. Every time I move my laptop, I have to reposition every pallete in VW. Gets so damn annoying!
  8. Building a script where I can right click on a pipe, choose a fixture, then have the script place fixtures on the pipe at either a fixed distance or per specified degree along the curve of a curved pipe. There are options between duplicate array, move by points, or align and distribute, but I don't believe any of them allows you to pick a pipe and a fixture and automatically distribute. I know how to do all the aligning and placing, I can figure out the length and radius of pipes and feed them in, but following paths is the harder part. For instance, when using a curved lighting pipe, it's fairly straightforward to get the length and radius of the pipe (although dimension fields come in with very strange formatting), but there's nothing in the pipe records which indicate the starting and ending angle of the pipe, it's center of arc, or rotation, at least as far as I can find. So, I figure I need to pull in the underlying arc to get its information.
  9. Oooh...thanks guys, I will test these out. I don't think the script I'm trying to write will work out because I'm not sure you can pull info from the underlying polygon/arc in a lighting pipe. But, this still gives me some stuff to play with.
  10. Me again...sorry for flooding the forum, but I'm on a writing kick... So, in custom PIOs, it's easy to show/hide/grey etc different parameters in the OIP. I assume the same thing is possible in custom dialogs, as things like the door tool change options in the dialog depending on what is in other fields. I'm looking to replicate that, but fear that it may be event-based or something, and I just can't wrap my head around that yet. I was hoping that a simple if/then statement would do it, but it appears to be more complicated than that, since I don't think it parses the field results until the OK button is hit. Any pointers, or is this far more complicated than that? In the handler section.... SetupDialogC: BEGIN AddChoice(dialogid,7,'Angle',0); AddChoice(dialogid,7,'Distance',1); SetItemText(dialogid,9,GetLName(ActLayer)); FOR symindex:= 1 to numsyms DO symindex:= InsertImagePopupResource(dialogid, 5, symlist, symindex); END; In the dialog section.... dialogid:=CreateLayout('Place Fixtures On Radius',TRUE,'Apply','Cancel'); CreateStaticText(dialogid,4,'Select Symbol:',15); CreateThumbnailPopup(dialogid,5); CreateStaticText(dialogid,6,'Mode:',15); CreatePulldownMenu(dialogid,7,20); CreateStaticText(dialogid,8,'Relative Angle:',15); CreateEditReal(dialogid,9,2,0,10); CreateStaticText(dialogid,10,'Length:',15); CreateEditReal(dialogid,11,3,72,10); SetFirstLayoutItem(dialogid,4); SetRightItem(dialogid,4,5,0,0); SetBelowItem(dialogid,4,6,0,0); SetRightItem(dialogid,6,7,0,0); GetSelectedChoiceInfo(dialogid,7,0,lindex,lmode); IF lmode='Angle' THEN BEGIN SetBelowItem(dialogid,6,8,0,0); SetRightItem(dialogid,8,9,0,0); END; IF lmode='Distance' THEN BEGIN SetBelowItem(dialogid,8,10,0,0); SetRightItem(dialogid,10,11,0,0); END;
  11. Alright...I was able to get this to work well enough for now. Can't figure out how to make it show only lighting devices, so in bigger documents, the list is huge. But, it's at least a start. What I was hoping for is something like this, but maybe it's not possible. Thanks for the help so far!
  12. Thanks...this has given me some stuff to look at. The SelectChoice for the layer menu works better than what I had come up with. It appears that it orders the list in alphabetical order, so now I'm just searching for the right way to find the alphabetical index of the layers. Man...the symbol stuff seems harder than I thought. Figured there would be a symbol popup window like what appears in so many tools, but it looks like you have to build it. ugh.
  13. Hey gurus... I wrote a script to place symbols (lighting devices) based on the position of a large container object and all of its settings. It all works exactly how I want it to. Right now, I'm using a couple of workarounds to get the correct final result, but I'd love to figure out a few sticking points.One is getting a symbol chooser in my dialog, and the other is how to populate the layer drop-down with the current layer. Some notes are in the code below (only relevant parts of the entire code are shown). I realize that it might not be up to real programmers type code. So, I thought CreateSymDispCtrlN or CreateSymbolDisplayControl might be the answer, but they display only images. I would like to get the symbol drop-down menu seen in other tools and then be able to pass off the resulting symbol choice to the lsymbol variable. The second issue is the layer dialog. Choosing the layer and passing it to the llayer variable works fine and functions correctly in the script. I just want the menu to default to the current layer, but doing a SetItemText for that component caused weird issues with selecting, so I'm not sure that's it. Any pointers would be very appreciated! FUNCTION Mydialog(var lsymbol:STRING; var langle : REAL; var llayer : STRING ) : BOOLEAN; LABEL 99; VAR dialogid, result : INTEGER; iTest : REAL; PROCEDURE Dialog_Handler(VAR item : LONGINT; data : LONGINT); BEGIN CASE item OF SetupDialogC: BEGIN ***DOES SOMETHING NEED TO GO HERE TO POPULATE THE SYMBOL DIALOG??*** ***I THINK SOMETHING NEEDS TO GO HERE TO POPULATE THE DEFAULT FOR THE LAYER DIALOG*** END; 1: BEGIN GetItemText(dialogid,5,lsymbol); ** THIS IS TEMPORARY UNTIL I CAN FIGURE OUT THE SYMBOL DIALOG AND HOW OT PASS THE RESULT IF GetEditReal(dialogid,7,2,iTest) THEN langle:=iTest; GetItemText(dialogid,9,llayer); END; 2: BEGIN END; END; {case} END; {Dialog Handler} BEGIN dialogid:=CreateLayout('Add Fixtures to Softboxes',TRUE,'Apply','Cancel'); CreateStaticText(dialogid,4,'Symbol Name',20); {CreateSymDispCtrlN(dialogid,5,'Arri SkyPanel S60-c',100,100,5,0,2,1,TRUE);} *** TRIED THE ABOVE AND CreateSymbolDisplayControl, BOTH OF WHICH SHOW ONLY AN ICON, NO MENU CreateEditText(dialogid,5,'Enter symbol here',40); *** THIS IS TEMPORARY UNTIL I CAN FIGURE OUT THE SYMBOL DIALOG CreateStaticText(dialogid,6,'Relative Angle:',20); CreateEditReal(dialogid,7,2,0,10); CreateStaticText(dialogid,8,'Layer:',20); CreateLayerPDMenu(dialogid,9,40); SetFirstLayoutItem(dialogid,4); SetRightItem(dialogid,4,5,0,0); SetBelowItem(dialogid,4,6,0,0); SetRightItem(dialogid,6,7,0,0); SetBelowItem(dialogid,6,8,0,0); SetRightItem(dialogid,8,9,0,0);
  14. Thanks for this. I don't think what I want to do is totally possible (I didn't think it was before I even started), but this temp tool thing could be pretty useful for some other stuff! One day, I will learn more than you've forgotten about this stuff!
  15. I would guess with the first click it would choose one point, then it would draw outlines of the new objects in place as the mouse was moved around based on the mouse position, until the mouse is clicked.. I would guess this would work better as a tool than a script. The end idea is largely based on the "Move By Points" tool, just with different custom options.
  16. I'm trying to figure out how to code the pre-visualiztion of object placement in a script/tool using Vectorscript. When you select an object, then use the "Move By Points" tool, the tool outlines the selected object(s), and dynamically moves them around the workspace as you move the mouse. I have been trying combinations of GetMouse, Mousedown, TrackObject and such, but can't seem to figure this out. Is this even possible, or is it something that only an internal Vectorworks tool can do? Or does it require something like events, which I have never figured out.
  17. My plugin objects. I have custom point-object tools I use for racks, cables, optos, network units, consoles, nodes, etc. In order to make them import/export with FileMaker Pro (where I have an extensive database I use to track every piece), I have a UUID procedure within the tool which assigns a UUID to the object in one of the fields, and as an object name. The object name will change automatically If duplicated, and the procedure will check to see if the ID and name match, and generate a new ID if they do not. But I need the UUID procedure to run again after duplication to make the ID unique to each object. But it won't run unless I change some data. HOLY CRAP. I thought I had tested this before multiple times and it didn't work...but checking "Reset on Move" and "Reset on Rotate" does fix that issue. Now to go update all my plugins!
  18. I just want code to run when an object is duplicated, so my objectID checker will run. But every time I see one of those event-enabled scripts, my mind turns into spaghetti.
  19. Thanks, Kevin. Darn...I was really hoping that it was going to put in a symbol selection menu or a texture selection option. That would be sweeeeeet. I guess the only option for those things is to just type the name into a text box, right?
  20. I've been making custom scripts and plugins for quite some time. But, I just noticed, I guess after a 2021 upgrade, that there are new options for script parameters (I assume these didn't exist . I got excited to see material and texture options, and a symbol definition. I was hoping these would allow me user-input of textures and symbols. But, they don't appear to do that. Can anyone explain how these are used, or if they don't actually do anything with point plug-ins unless they're set up a certain way?
  21. Sigh...that's what happens when I don't finish reading the entire post and move on to the responses....🤔
  22. Note that the eyedropper tool works on viewports with layer and class settings and is pretty immediate.
  23. So THAT'S why so many of my scripts don't report what they used to.
  24. Yeah...I've done the deal with PDFs for many years, ungrouping then dealing with the resultant parts. For some reason, I just missed that they were there since they were hidden and weren't selecting.
  25. I just opened this back up to say that I found the issue. The lines were there, but were covered with a white rectangle, thus not appearing when I showed everything. I was sure I had deleted them, but apparently I had not.
  • Create New...