Jump to content

Marc Powell

Member
  • Posts

    10
  • Joined

  • Last visited

Posts posted by Marc Powell

  1. Yep...  my pallets do the same thing.  I'll bet you are correct - it has to do with two separate destinations that have different scaling.  I do an OK amount of programing now a days, and it works great for setting up a show before I get onsite.  I've pre patched and set groups and such in several airports on my way out to gigs and that touchscreen works very well as a software control surface.  Also, its great for when I'm using Vision at home for small test modules.  Super quick setup rather than having to get a console in the office.

     

    As for this PIO I'm putting together - it works well in it's current state, but I moved around the parameters in the parameters hierarchy to display in a certain in the OIP, and it seems like the text that is entered in the dialogue box only updates the text in the first text parameter in the list from a hierarchical standpoint.  I've attached the .vso to this post and here are the parameters as they currently stand:

    image.png.18018201b734f8add7441b367426fc3f.png

     

    Also, here is the code:

     

    Quote

     

    PROCEDURE CableDropBreak;

    CONST

        kResetEventID = 3;
        kObjXPropHasUIOverride = 8;
        kWidgetButton = 12;
        kObjOnInitXProperties = 5;
        kObjOnObjectUIButtonHit = 35;
        kButton1ID = 3000;
        
        kFontEnabled = 800;

    VAR

        LineVal,NLineVal,HalfLineVal,NHalfLineVal,OvalVal,NOvalVal,HalfOvalVal,NHalfOvalVal : REAL;
        BreakDrop:STRING;
        objName:STRING;
        objHd,recHd,wallHd:HANDLE;
        text:STRING;
        theEvent,theButton,dialog,layoutDialog:LONGINT;
        result:BOOLEAN;
        
    FUNCTION DrawDialog(DName:STRING) : LONGINT;

        CONST
        
            kTextWidth = 50;
            kTextHeight = 20;

        VAR
        
            dia:LONGINT;
            
        BEGIN
            dia:=CreateLayout(DName,FALSE,'OK','Cancel');
            
            CreateEditTextBox(dia,11,'',kTextWidth,kTextHeight);
            
            SetFirstLayoutItem(dia,11);
            
            DrawDialog:=dia;
        END;

    PROCEDURE DialogHandler(VAR item,data:LONGINT);

        BEGIN
            CASE item OF
                SetupDialogC:
                    BEGIN
                        IF(text <> '') THEN SetItemText(dialog,11,text);
                    END;
                1:
                    BEGIN
                        GetMultilineText(dialog,11,text);
                        SetRField(objHd,GetName(recHd),'CableTextDT',text);
                        ResetObject(objHd);
                    END;
                2:
                    BEGIN
                    END;
            END;
        END;

    BEGIN
        text:=PCableTextDT;
        
        IF GetCustomObjectInfo(objName,objHd,recHd,wallHd) THEN SetObjectVariableBoolean(objHd,kFontEnabled,TRUE);
        
        vsoGetEventInfo(theEvent,theButton);
        
        CASE theEvent OF
            kObjOnInitXProperties:
                BEGIN
                    result:=SetObjPropVS(kObjXPropHasUIOverride,TRUE);
                    result:=SetObjPropVS(kWidgetButton,TRUE);
                    result:=vsoInsertAllParams;
                    
                    result:=vsoAppendWidget(kWidgetButton,kButton1ID,'Cable Drop/Break Text',0);
                END;
            kObjOnObjectUIButtonHit:
                BEGIN
                    CASE theButton OF
                        kButton1ID:
                            BEGIN
                                dialog:=DrawDialog('Contents');
                                layoutDialog:=RunLayoutDialog(dialog,DialogHandler);
                            END;
                    END;
                END;
            kResetEventID:
                BEGIN
                    
                    {Remove Brackets to create text box as part of PIO}
                    {Locus(0,0);
                    IF(text <> '') THEN CreateText(text);}                
                    {Define Variable Values}
                    LineVal := POverallObjSize;
                    NLineVal := 0 - POverallObjSize;
                    HalfLineVal :=  LineVal / 2;
                    NHalfLineVal :=  (0 - LineVal) / 2;
                    OvalVal := (POverallObjSize/4)*3;
                    NOvalVal := ((0 - POverallObjSize)/4)*3;
                    HalfOvalVal := OvalVal / 2;
                    NHalfOvalVal := (0 - OvalVal) / 2;

                    {Draw Object}
                    Oval(NHalfOvalVal, NHalfOvalVal, HalfOvalVal, HalfOvalVal);
                    Move(HalfLineVal, HalfLineVal);
                    Line(NLineVal, NLineVal);
                    Move(0, LineVal);
                    Line(LineVal, NLineVal);
                    Move(NHalfLineVal, HalfLineVal);
                    
                END;
        END;
    END;

    Run(CableDropBreak);

     


    I thought I made an edit in your code that would pull the text from and update directly to 'CableTextDT', but that isn't the case currently.  Any ideas?  I'm sure I integrated the code incorrectly, but I can't figure out where I went wrong.

     

    Thanks

    Cable Break Test.vso

  2. @Pat StanfordI was just trying to take information that the data tag was referencing and maping it to a record format attached to the data tag.  You replied in another forum that the data manager should work and it sure did.  I was able to create a record format and then using the data manager, map the info I want to the fields and then it applies to all instances throughout the drawing.  I have never had to interact with the data manager and I never realized the flexibility it allows for.

     

    @Sam JonesI"m going to send you an email.  I finally got to the point that I ran my first tape, and you nailed it.....  data tags aren't even recognized.

     

    Thanks!

  3. @Jesse CogswellI'm pretty new to anything more than basic vectorscript and haven't done any real coding in a couple of decades (even then, it was very rudimentary).  That said - THIS HELPED IMMENSELY.  I was able to take the small bit of code I wrote for the PIO and integrate your code into it and am now getting exactly what I wanted to accomplish.  Thanks a ton.  I'm still working on applying attributes to the line work in the PIO and I'm looking to have it draw two different ways depending on which selection is in a particular parameter.  I'll share the object when I get it to a somewhat final stage, but this was a huge help.

     

    THANK YOU!

     

    By the way - how do you like your ZenBook Duo?  I bought the same model several months ago and have been loving it.  I have an odd issue where my pallets don't want to move down to the smaller screen when I have VW open on the main display.  I'll drag them down and as soon as they hit the bottom bound of the primary display, they just won't move any further.  The cursor gets down there, but the window just won't move past the bottom of the primary.  It's odd.

  4. Thanks, Andrew

     

    I don't need to actually display the text, just enter it into the OIP so it exists to be referenced (like a text line in a record format, but with the ability to enter data with carriage returns) by a data tag or the data manager.  The issue is getting the input.

     

    I've been working on this for a couple days now and I've created the plug-in object and have created a dialogue box that will accept the amount of text I need to accept (with the dialog builder), but I'm now having trouble marrying the two and assigning it to a "name".

     

    What I'm trying to do is draw a plug in object that represents a cable drop or a cable break (done and it works) and add fields in the OIP that would show up on different sheets or a truss tape (which I've got all of them except a text box that will allow for carriage return).  I can't get a parameter to show up in the OIP that will allow for multiple lines of text, so I am trying to get a dialog box that will allow me to enter text that I can then create data tag styles to refer to the text.

     

    Make sense?  Any advice would be more than welcome.

     

    Thanks

  5. Hey folks

     

    I've created a plug in object that has several definitions.  I need to create multi line text within the PIO somehow to be referenced by a Data Tag (like how a callout uses a multiline text box).  I've hit a wall in my knowldge of PIO creation and vectorscript.  Anyone have any ideas?

     

    Thanks

  6. Hey Folks - I'm assuming that the only answer here it a script of some sort, but here it goes:

     

    Issue - I've created a record format that has a few fields that is needed to map to symbols created with another command.  I need to be able to take something like 150 instances of the same data tag/callout, attach a record format to them and then get the information referenced in the data tag/callout into fields in the record format.  Any ideas?

     

    Explanation - I'm using Sam Jones' truss tape tool to create truss tapes.  A designer has put data tags where all universes begin on each instrument where it begins (and callouts at the end of each truss for cable breaks) and I want to be able to print those out on the truss tape. To have a symbol or other object translated to the truss tape, it needs a record attached to it.  Whatever information shows up in the symbol on the tape must be in the record.

     

    Any suggestions are welcome.

  7. Hey Folks - I'm assuming that the only answer here it a script of some sort, but here it goes:

     

    Issue - I've created a record format that has a few fields that is needed to map to symbols created with another command.  I need to be able to take something like 150 instances of the same data tag, attach a record format to them and then get the information referenced in the data tag into fields in the record format.  Any ideas?

     

    Explanation - I'm using Sam Jones' truss tape tool to create truss tapes.  A designer has put data tags where all universes begin on each instrument where it begins and I want to be able to print those out on the truss tape. To have a symbol or other object translated to the truss tape, it needs a record attached to it.  Whatever information shows up in the symbol on the tape must be in the record.

     

    Any suggestions are welcome.

  8. I, too, have experienced this exact issue, but it is not intermittent, and I use this feature ALL THE TIME.

     

    I am using win 10, as well.  NeilB, are you suggesting that the automated migration process may affect the floating datum bar?  I used the automatic migration process (meaning I responded with a yes).

×
×
  • Create New...