Jump to content

Sam Jones

Member
  • Posts

    1,192
  • Joined

  • Last visited

Posts posted by Sam Jones

  1. If I only want to change things that should be changed,

    1. Everything I see selected in show/snap/modify layer option

    OR

    2. Only things on the selected layer in all other layer options, since I cannot see what is selected,

    I do the following

     

        LayerOptions := GetLayerOptions;
        ActiveLyr := ActLayer;
        ActiveLyrName := GetLName(ActiveLyr);

     

            IF LayerOptions = 5 THEN {Show/Snap/Modify Others}
                ForEachObject(ProcedureToMakeChange, (((VSEL=TRUE) & (main criteria))))
            ELSE
                ForEachObject(ProcedureToMakeChange, (((VSEL=TRUE) & (L=ActiveLyrName) & (main criteria)));

     

     

     

     

    • Like 1
  2. The problem with the VSEL criteria is that it will move objects all the objects that are visible and selected (as you would expect), except that it will do this with the Layer Options, "Show Others" and "Show/Snap Others.  When those layer options are selected the selected objects on other layers are not shown as selected.  This allows you to modify objects you did not intend to modify. 

  3. I use the Message dialog to tell the user either what will happen next or what to do next.  Example, I have a command that allows the user to assign the circuits of a multicable (multiple circuits) to different lights.  The Message window tells him the number of the circuit he is about to assign, and it increments that number every time he clicks on a light and assigns a circuit.  There are a bunch of other things that the user can do with the click by holding down modifier keys and the Message window also tells the user what those options are.  The only thing the user does is click on lights one at a time.

     

  4. Michael, did you try both of my versions?  If you did, you are doing something wrong.🤪

     

    Pat, I prefer the mouse click to the flash of the AlrtDialog, but that is a matter of taste, and I don't ever use it for that, so my taste doesn't count.

  5. Try the following:

     

    Procedure Test;

    VAR    N1:Integer;
        X, Y    :INTEGER;

    BEGIN
        For N1 := 1 to 3 do
            Begin
                Message('Hello World. ', N1);
                GetPt(X, Y);
            End;
    End;

    Run(Test);

     

    After that, swap the GetPt() and the Message() statements.  Both versions work here.

     

     

  6. Actually, you can get the Message dialog to update during the run of a script, but only if you don't use any other dialogs in the same script.  Resizing and positioning the Message box remains as you describe, only done manually.

  7.  

    2 hours ago, Mark Aceto said:

    Data Validation is something I've discussed / requested with Sam but it sounds like VW has an issue with accomplishing that for some reason.

     

    Data Validation is an issue with pull down menus in the OIP and Worksheets when trying to paste a drop down value into multiple selections.  I understand the problem but they have conquered many harder tasks that were not as sorely needed.

    As for validation while typing, I don't see VS ever doing that.  VW is capable of it as we see in the new VS editor, to a really annoying extent.

    • Like 2
  8. Use the UID of the Lighting Device instance which is in the "Name" parameter at the bottom of the OIP.  Doing a GetObject() on that string value will give you a handle to that particular Lighting Device, and then use SetRField() using that handle.  You only need to SetRField() for the parameters you want to change.  All the rest will remain unchanged.  HTH.

  9. In my experience, there is no limit for the number of objects the ForEachObject() procedure can handle.  SetRField isn't particularly slow, but VS is interpreted, and you are making 30 assignments of string variables for each of 300 objects.  I have 2 recommendations.  One, go get coffee and/or do the dishes. Or two, try and get your data into .XML files.  Data input with XML files is lightning fast.  They load really fast, and they assign really fast.  However the speed problem is killing you, there shouldn't be a limit on the number of Lighting Devices.

  10. 1 hour ago, Mark Aceto said:

    And a whole lot of work, as noted above, just to change the color vs typing "black" or "silver" in the OIP. This is what sold me on the power, and speed, of Data Vis.

    Not really a whole lot of work when compared to manually typing in the color; in that, once the symbol is made, you don't have to type in those values.  If things change, you can still change the record field values and use data vis.  If you use a set of different kinds of truss often, you will save time by making symbols without giving up the ability to change the field values and use data vis.

    I'm not going to touch the problem of swapping out different truss lengths.  There are simple scenarios and Andy mentioned, but there are a lot of scenarios that require very convoluted programming logic to pull off.

    • Like 1
  11. For sure, but this command has a lot of room in it, and I am curious if the big shows can quantify this.  It would be great if one of the 3000 unit (in Lighting Devices), can tell me how many pieces of truss they used.  Also, limiting the command to dealing with objects with the "Truss Record", may not provide a reliable number to use in the "ALLOCATE" command.  However, I am running some test testing the Count() command using the criteria "Count(INOBJECT & (R IN ['Truss Record'])).  I might be able to use this with some padding.

    Still, what is a large truss rental order?

  12. There seem to be 2 issues.  Collecting piece data and collecting weight data.  Let's talk about collecting piece data in this response.

    In order to collect the pieces that make up a Hanging Position (HP), a data tag would need to enter the Path Profile (PP) of the HP.  That profile can be constructed differently depending on what is selected when the HP is created.  I'm not going to consider HPs created from straight truss for now, though piece information is in the PP created from straight truss.  In the 4 HPs below each one has been created a different way.

    image.thumb.png.ea855838784f1c872da5f4794d94f1a1.png

    Truss tags on the ends of the truss were created by a vectorscript in AutoPlot Tools which knows how to enter the PP of the HP.  It also knows the difference in how to handle symbols from how to handle "Truss" objects.  It also knows how to enter groups.

    I am not that facile with Data Tags, but I don't think they can have the necessary programming power to do the above.  If I'm wrong, great, and I will need to find out somewhere how to program Data Tags; though, I think it will always be easier for me to script what I need.  All of that being said, it would seem that you need a command that would look at the selected truss and create the report you are showing.  I think such a report would be found useful by many users, and I don't see it in the Spotlight report menu.  I will consider making such a command.  The biggest problem is that the format would probably be hard coded and would not be specifiable by the user; however it could then be exported to Excel.  It would always be a one way report that collects information.  Truss sticks could not be reconfigured from the worksheet.

    There are similar issues with weight, but they are not exactly the same.  I'm not sure when I'll get to that discussion.  Feel free to message or email me if you wish to discuss this further.

     

    Sam

    Samuel L. Jones
    Developer of AutoPlotVW, AutoPlotTools for SpotLight, and Chain Hoist Tools
    sjones@autoplotvw.com
    (310) 993-4172(cell)
     

  13. 14 hours ago, Pat Stanford said:

    I have created some fairly large worksheets using SetWSCellFormulaN and have not found it excessively slow.

    Depends on what you mean by "excessively slow".  I have removed, separated out, some WS creation because it slowed things down too much.  Unfortunately, the need for the WS creation remained, and was put in a separate command.  (When I could).  The speed problem came about when I was creating long list of havested information with concatenated data.  After several tests isolating the data collection, data concatenation, and writing the cells, writing the cells was the main drag on time.  Still it was the fastest way I had of making the lists I needed.  One could always try typing the data into a list of any kind by hand, to make one put up with a slow script.

     

  14. 1 hour ago, klinzey said:

    When you create the command in the plug-in manager you should add the parameter fields you need.

    If the command name is "AP Make Jumper Cable Chain" then

    PIORecName := 'AP Make Jumper Cable Chain';
    PIORecHdl := GetObject(PIORecName);

    Should work.

     Unfortunately, it doesn't.  Sometimes, with some commands, it does.  Using the NIL handle returns bad handle error.

     

    1 hour ago, klinzey said:

    The better way to do it is to use Set/GetSavedSetting() if you want to settings to apply across documents, especially because the user can reset them, and Rpstr if you want them to apply to just the document.

    I know how to do this.  I do it often.  I have gotten into the habit of making the subroutines to do all this when I create the SetupDialogC case statement of any dialog that might want set and retrieve defaults.  I am somewhat unreasonably gunshy on piling on the XML file that holds these settings.

     

    Thanks Kevin and Josh in confirming what I suspected.  As an aside, Kevin, are the bad handle errors ignorable?

  15. I want to get a handle to the command that is running within the command's code, so that I can store date in the parameters of the command with

    GetRField(commandHandle, commandName, parmeterName);

    SetRField(commandHandle, commandName, parmeterName, newValue);

     

    I am trying to get the handle with these lines in the commands code:

        PIORecName := 'AP Make Jumper Cable Chain';
        PIORecHdl := GetObject(PIORecName);

     

    PIORecHdl always returns NIL.

    Why is this happening, and what method should I use to get the handle of the currently running command?

     

    TIA,

    Sam

     

     

    PIORecName is the name of the running command

  16. Josh may be of more help here, but be sure in addition to ResetObject(LDHandle) after setting the parameter value in each Lighting Device,  you run RedrawAll at the end of your script.  You should be able to get away with running Redraw, but I have had inconsistent success with Redraw recognizing or finding changed Lighting Devices.

  17. If you are into a Braceworks workflow, and having Braceworks calculate loads I will leave you to it.  I don't use Braceworks; however, many of us want to get as much of the load information as possible just to keep us in the ball park.  The screen shot below shows a worksheet of all the selected devices below it.  Depending on the hanging position, to report the weights can be problematic unless everything has, or is, a Braceworks load.  The AutoPlot command ("Collect & Total Weight") used to generate the worksheet below queries the weight fields of the selected objects and lets you substitute your own weights if you desire.  Hanging positions of truss can be made up of 5 different kinds of VW constructions.

    1. Truss created with the Straight Truss tool

    2. Truss created with VW truss symbols

    3. Truss created by grouping VW truss symbols

    4. Truss created using VW Truss PIO objects

    5. Truss created by grouping VW Truss PIO objects

    How weight is collected from each of these is different.  It became a little simpler in 2022, but not much, and I didn't even include circular truss.  The command goes into a deep dive as to where to collect weight values in each case.  Then we have Hoists.  Legacy Hoists and the current VW version of hoists report weight differently, and of course you will want to decide whether or not you want to include chain weight, which you almost always will want to do.  The two versions of Hoist report chain weight differently.  Then we have the Video Screen object and the Blended screen object, and they report weight differently.  With the Video screen object you need to be given the choice of whether to use the screen weight or the projector weight.  Also, you should note that Lighting Devices do not report the weight of the accessories in the "Weight" field.  They do report the combined weight in a "Total Weight" field that is greyed out in the load information section.  You do not have access to that field in a worksheet, but it is possible to query the weight accessories in vectorscript which is what the command that makes the worksheet does.  This allows you to enter weights as needed, since the vast majority of accessory symbols have "0" in their weight field. 

     

    If you care, there is more to collecting weight than just adding the hoist weight to the the hanging position total.  What is your workflow and how do you use weight?

    AutoPlot "Truss Tags" will also try to decipher weight information, but that is another discussion.

     

    Image.thumb.png.835c90aa09bc0541805b44623dda9b5b.png

     

×
×
  • Create New...