Jump to content

DCarpenter

Member
  • Posts

    92
  • Joined

  • Last visited

Posts posted by DCarpenter

  1. You nailed it!!!

     

    All my scripts and include files are in a folder within the Plug-ins folder ( Plug-ins/Myscripts/... ), but when I created a new linear object, it (by default) places the new script in the Plug-ins folder which is why it couldn't find the include file.  So I placed the new linear object script inside my 'Myscripts' folder and my script compiled correctly.  I think, in my head, I thought it would look within everything within the Plug-ins folder for the include file, but apparently not.  

     

    Big thank you once again.

    Dave

  2. I use the $INCLUDE command on many of my scripts, and it works just fine.  I'm involved with changing this current script from a point object to a linear object and in doing so I'm simple copying and pasting the code from object to another, but in doing that I've generated a script error on my $INCLUDE line and I'm not sure why.  I've tried rewriting it, closing it/reopening it, closing/opening VW, but nothing seems to be working.  It works fine in the original script, but not this one.  Thoughts?

     

    Dave

    Screenshot 2024-03-20 at 2.14.51 PM.png

  3. Pat,

     

    Thank you so much.  It's interesting that the Data Tag doesn't automatically update the name of the viewport when it changes unlike other information that a Data Tag updates right away. If you would allow me to highjack this thread and take it in another direction, a questions I've always wondered is what is the program language is that Data Tags use?  I've written a fair amount of scripts and I feel like Data Tags could be very powerful, but have had trouble finding where I can find more information about the language it uses and how to access different functions or procedures.  Any insights on that would be greatly appreciated.

     

    Dave

  4. See attached.  In customizing a Drawing Label, I'm hoping I can capture the name of the viewport that the Drawing Label is in.  It's able to capture the scale of the current viewport so I would think it would be easy to capture the viewport name.  But for everything I've tried to enter: #Drawing Label2#.#Name#, #Object Name#, #ObjectN#, #Viewport Name#, etc., nothing seams to work.  Does anyone have any ideas?

    Screenshot 2024-03-01 at 2.01.38 PM.png

  5. Newbie question about Graphic Legends, see attached.  I've created a Graphic Legend to summarized symbols in a viewport according to a unique record that is attached to each object.  I love the way it summarizes each symbol and gives me a total count for each, but for PIO objects (Soft Goods, Video Screen, Rope and Stanchion) it itemizes them instead of summarizing them.  Not sure I understand Graphic Legends enough to figure out where the problem is so I'm hoping someone else might have a solutions.  VWX file attached if that's more helpful.

     

    Thank you for your time,

    Dave

    Screenshot 2024-03-01 at 1.14.20 PM.png

    Example3.vwx

  6. When transferring files over to a new computer I move the Plug-ins, Library, and Workspaces folder over but don't usually pay much attention to the TXT files at the root directory of the User Folder.  I would like to find where my custom page sizes are kept in my User Folder but am stuck trying to find where that info is stored.  Is that info in those TXT files in the User Folder root directory?

     

    Dave

    Screenshot 2023-09-14 at 2.16.13 PM.png

  7. See attached for clarity.  I'm trying to figure out how to 3D rotate a string of text within the script.  Rotate3D, Set3DRot, and SetRot3D doesn't work on the text unless I convert the text to a 3D object which I'm trying to avoid.  Not sure if I have to flip my working plane first and then create it?  I'm hoping I can avoid that.  Hoping someone out there might know a command I haven't tried yet.

    Screenshot2023-07-12at4_49_35PM.thumb.png.96cce64b3a32bc8097a3e340b792bf3b.png

  8. On 6/25/2023 at 8:00 PM, Pat Stanford said:

     The forum parser would not let me post what I wanted.)

     

    Pat, Thank you as always.  I've always appreciated your help especially when I hit road blocks like this.  I will look for examples of using a number pointer and use of an offset, and let you know if i have any questions.  

     

    Did you get a citation from the Forum Police? 

    Posting government Vectorworks documents or something?

  9. I’m writing a vectorscript, and I need to label multiple objects in a grid (an LED wall to be exact), so my labels would be: A1, A2, A3…, B1, B2, B3… etc.  sequencing numbers is easy, but how do I sequence letters?  Is it possible to convert a letter to a number and sequence that way?  
     

    Dave

  10. Yeah, I know I could go through and replace the individual symbols separately, but that would take time.  Looking for an automated solution like the material substitution within the import process of Twinmotion, but for symbols.  I know I'm still a novice with Twinmotion, just trying to find solutions to minimize our time spent preparing a file, so we can focus on creating an awesome render.

  11. Long time VW user / script writer, and very novice Twinmotion user.

     

    Curious question that I hope isn’t to much of a bother.  I’m curious if I have the ability to write a script/program in Twinmotion to substitute imported Vectorworks symbols with Twinmotion symbols from its internal library or user library.  My current VW symbol library doesn’t have any materials attached to its 3D components so using the functionality to substitute materials during the import process within Twinmotion isn’t very helpful.  I’m  hoping I can write a simple script to substitute symbols but don’t know if I have that kind of access or functionality within Twinmotion to do that.  Hoping someone might be able to offer some clarification to help guide my search in working Twinmotion into my workflow. 

     

    Dave

  12. Pat,

     

    I'm not sure I completely understand what your asking.  The PIO retrieves symbols from a symbol file and places them in the correct order within the PIO.  If I eliminate the rectangle "aaa", the worksheet works as expected, but as soon as I use the "Location" criteria, it freaks out.   I makes me wonder if the worksheet is using the coordinates of the insertions points within the PIO, verses their real world coordinates in the drawing.  Not sure, but thank you for looking at it.

     

    Dave

  13. See attached image to better understand what I'm describing.  I have on my drawing a PIO that places 4 symbols next to each other, and a Symbol called "Chair", all located within a rectangle called "aaa".  When running a worksheet of all the symbols within the rectangle called "aaa", it is unable to see that the 4 symbols within the PIO.  Can you help me understand what is happening and how to fix it?   Attached is a screenshot for reference and the VW file.

     

    Thank you in advance.  I always appreciate the help I get here.

    Dave 

    Screen Shot 2021-07-16 at 3.38.06 PM.png

    Test.vwx

  14. WOW!!  I feel like I got the "A" team jumping on this, and so interesting to see how each of you would tackle this issue.  I like the way Julian came at my problem so I took his code and revised it a bit to meet my needs.  It still needs to be refined a bit but it does what I need it to do for now.  I probably lost hours of time trying to figure out which selection procedures to use between the Selection class and the Document List Handling class.  The code you all shared with me was super helpful with helping me steer my thoughts and direction.  Thank you all for offering your help.  The three of you are the pillars of this Forum.

     

    I wrote this code because sometimes I get DWG files where the end points of lines to exactly match, so when I use the 2D polygon, paint bucket, tool, I'm unable to fill different cavities quickly.  So I figured a quick little script to extend all the lines 2" in either direction should do the trick, and then when I was done, I could use the same tool to restore everything back to normal.

     

    Dave

     

     

    PROCEDURE IncreaseLength;

    VAR

         h1 : HANDLE;

         i,k: INTEGER;

         rCenterX, rCenterY : REAL;

         rScaleFactor : REAL;

         rExistLen, rNewLen : REAL;

         MyH: DYNARRAY [] OF HANDLE;

    BEGIN

         SelectObj(T=2);

         i:=NumSObj(ActLayer);

         ALLOCATE MyH[1..i];

         h1:=FSActLayer;

         FOR k:=1 TO i DO BEGIN

              MyH[k]:=h1;

              h1:=NextSObj(h1);

         END;


         DSelectAll;

         rNewLen := RealDialog('Length increase:','2');

         k:=1;

         WHILE (k <= i) & (i <> 0)DO BEGIN

              HCenter(MyH[k], rCenterX, rCenterY);

              rExistLen := HLength(MyH[k]);

              rScaleFactor := (rExistLen+rNewLen) / rExistLen;

              SetSelect(MyH[k]);

              Scale(rScaleFactor, rScaleFactor);

              DSelectAll;

              k:=k+1;

         END;

    END;

    Run(IncreaseLength);

  15. Thank you for the clarity.  I was hoping there was a way of selecting the center of the line and then changing it's length like I can do in the OIP manually, without doing all the math, but I guess not.  Bummer.  HScale might work for me though.  Thank you once again.

     

    Dave 

  16. I'm stuck,

     

    See attached Excel worksheet image for clarification of what I'm trying to do in VW.  I've created a worksheet in Vectorworks with four different database rows in it.  Each database row calculates, summarize, and displays information in a different layout than the others, but the one thing they have in common is that they all get their information from the same three layers in the VW drawing.  What I'd like to do is create one place (C14,D14, and E14 in attached image) that can determine what layers are used in the four databases (rows 20, 22, 24, and 26), so the user doesn't have to edit the criteria for each database.  Is that possible? 

     

    In excel I can create a cell that has a pull-down list of values the user can choose from.  If it's possible,  I would love to do that in the VW worksheet where the pull down is a list of the layers in the VW document, then each database row would reference those cells to determine which layers to look at.  I am comfortable writing my own script if that's helpful, but am hoping there's an easier way to do this within the worksheets.

     

    Any thoughts?

    Screen Shot 2020-04-30 at 12.00.06 PM.png

×
×
  • Create New...