Jump to content

SamIWas

Member
  • Posts

    287
  • Joined

  • Last visited

Posts posted by SamIWas

  1. 17 hours ago, JBenghiat said:

    @SamIWasYour own object or any object?

    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!

    • Like 1
  2. On 7/25/2021 at 7:55 PM, JBenghiat said:

    Note, you need a hex editor to enable an event-based tool. The biggest feature of the event enabled tool is customizing the mode bar, as well as handling multiple clicks easier to work with. Many of the limitations are still there though, for example, the code still doesn't run until after the first click.

     

    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.

  3. On 7/21/2021 at 9:07 AM, klinzey said:

    The new parameters are used to store a reference to a resource. They will not be displayed on the OIP.

    For example, the Symbol Definition filed will store the name of a symbol and only a symbol. If you try to put other data in the field if will not store the information.

    When the symbol name is changed in the Resource manager, the filed will be updated so the object can use the new value.

     

    You still need another user interface element to allow the user to select the resource, so these are not simply parameters that you can just drop into the OIP.

     

    The other new options work in a similar manner.

    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?

  4. 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?

     

    image.png.edc2fb2436afe7320077b9cf0d815f57.png

  5. 1 hour ago, Jesse Cogswell said:

    @SamIWas ,

    @line-weight mentioned in the original post that they have been using the eyedropper tool to do this, but it becomes very tedious if you have a large number of viewports spread across multiple sheet layers, the tool I wrote and posted above allows you to do it all in one go, and has the ability to force the viewports to run an update as well.

     

    Sigh...that's what happens when I don't finish reading the entire post and move on to the responses....🤔

     

  6. On 10/21/2020 at 7:13 PM, line-weight said:

     

    Yes indeed ... although there is also the possibility that an investment of time doing something moderately engaging, to write a script say, is still worth it, if it avoids a smaller amount of time doing something incredibly tedious/frustrating.

     

    Note that the eyedropper tool works on viewports with layer and class settings and is pretty immediate.

  7. On 10/26/2020 at 1:26 PM, Pat Stanford said:

    The Message command "stopped working" a few versions ago in that it does not operate during a Vectorscript, but only at the end of the script. At least that is my memory.

     

    You can either use AlrtDialog, and require the user to hit enter to proceed. (this is my go to for debugging) Or you can try AlertInform and set it to be a minor alert. The problem with that is the second time you call AlertInform it ignores the Minor and pops up a dialog box instead of just putting the information into the message bar.

     

    If you really feel you need a progress indicator you might be better off in Python and use Python objects instead of VW objects.  +1 to @JBenghiat 😉

     

    So THAT'S why so many of my scripts don't report what they used to.

  8. 3 hours ago, Pat Stanford said:

    When you Ungroup a PDF you typically end up with 3 items. A bitmap of the PDF on top. A white rectangle (we think it represents the paper). And finally at the bottom a Group containing all of the vector linework and text that VW can extract from the file.

     

    It sounds like you had ungrouped the PDF and deleted the bitmap but not the rest.

     

    Glad you found the problem.

    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.  

  9. 11 minutes ago, Pat Stanford said:

    How complicated is your drawing? You might try exporting back on version to a VW file and then updating that back to your current version.

     

    Is there any specific action that causes the lines to show?

     

    Have you tried to Purge unused objects?

     

    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.

  10. I had imported a pdf, which I ungrouped to get normal lines.  It brought in hundreds of thousands of lines, which of course bogged down the machine.  I deleted all of it.  Weeks later, I'm working on the drawing, and periodically when zooming or performing a move command, these phantom lines reappear for a few seconds before going away.  Being that it's 100,000 of them, it causes a long pause on my MacBook Pro.  I have turned on every class and layer, and the lines are not actually in the drawing.  They are just phantoms showing up randomly.  Any idea how to get rid of these...it's absolutely draining my workflow speed.  I'm starting to think I will have to manually copy each and every existing thing to a new document...

  11. 16 hours ago, Pat Stanford said:

    It actually is not that bad. There are a number of ways to do it with some fairly simple loops.

     

    Probably the easiest would be a ForEachObject using a Criteria of Selected is True and PON = 'Door'. PON stands for Plug-in Object Name.

     

    Code fragment not tested:

    
    Procedure(Test);
    
    Procedure Execute(Hd1:Handle);
    Begin
      SetClass(Hd1,'MyClass');
    End;
    
    Begin
      ForEachObject(Execute, (((Sel=True) & (PON='Door'))));
    End
    
    Run(Test)

     

     

     

    Holy crap, man...that worked!  This is going to make updating old files, and inserting new doors and windows, so much faster!

  12. 37 minutes ago, Pat Stanford said:

    It actually is not that bad. There are a number of ways to do it with some fairly simple loops.

     

    Probably the easiest would be a ForEachObject using a Criteria of Selected is True and PON = 'Door'. PON stands for Plug-in Object Name.

     

    Code fragment not tested:

    
    Procedure(Test);
    
    Procedure Execute(Hd1:Handle);
    Begin
      SetClass(Hd1,'MyClass');
    End;
    
    Begin
      ForEachObject(Execute, (((Sel=True) & (PON='Door'))));
    End
    
    Run(Test)

     

     

    Thanks Pat!  I'll try this tomorrow and see how it goes.

  13. 3 hours ago, MullinRJ said:

    Using: Message(GetTypeN(FSActLayer));

     

    If I select a free standing Door I get type 86 (Plug-In object).

     

    If I select a a Door in a Wall I get type 68 (Wall object).

     

    To see the Door on a test wall I have in an open document, I needed to use:

    Message(GetTypeN(NextObj(NextObj(NextObj(NextObj(NextObj(NextObj(NextObj(FIn3D(FSActLayer))))))))));

     

    As you can see, the door object is deep inside the Wall object. The number of objects in front of it are not exact, and are determined by the wall's construction. You should use a loop to look for the Door, or possibly try ForEachObjectAtPoint(). There may be a more direct way to get to the Door-in-Wall that someone else can point to. I've just done a cursory quick dive at this. 

     

    Again, make sure your handle is pointing to a Door object before trying to access its record.

     

    HTH,

    Raymond

     

    Holy schniekies.  So, it looks like selecting a bunch of doors throughout a document and trying to change records in this way wouldn't work very well.  

     

    What I was trying to do was create a script that would assign my default class scheme to doors that I pull in from older drawings.  

  14. With the lighting device, I can just use SetRField and GetRField to get and set info for the lighting device.  With door, this doesn't seem to work.  As a test, I used GetRField(h,'Door','2DLeafClass') and GetRField(h,'Door','2D Leaf Class').  but neither works.  Is there different way to get and set door info via script?

     

    EDIT:  I have found that it works when the door is not in a  wall.  But, once the door is placed in a wall, I can no longer get the script to pull info from it.  Surely there is a way.

  15. 1 hour ago, rDesign said:


    I believe that FileMaker can import from & export to Excel files, so presumably you could use this new 2021 Excel file functionality as the means to transfer data / records between Vw <—> FileMaker, without needing the MS Excel application itself. Just a hunch.

     

    Yeah, I already do that via text files.  It's just an extra step in the process.   I know that a direct, immediate, and automatically updating connection is possible with Filemaker via ODBC.  I've gotten it working briefly on small projects, but it is mind bogglingly difficult.  I'm hoping for VW and FM to work together to make a solution with easy, automatic connection between the two.  FM Is so powerful when it comes to tracking and reporting data.

    • Like 3
  16. On 9/1/2020 at 5:54 PM, The Hamma said:

    I have a spreadsheet with a list of equipment and each piece of equipment is identified with a unique id.  I also have symbols in the drawing with a record attached and a matching field for every column in the spread sheet.   I was able to create a report based on the record and I am able to copy cell by cell manually from the imported spread sheet to the record report worksheet.  My question is has anyone written a script that would search a worksheet for a matching id and copy all of the following cells in the row to the other worksheet?

     

    Are you saying you have a spreadsheet outside of Vectorworks and want to import  that spreadsheet, match each line to a symbol, and apply the data from that spreadsheet to the symbols, filling the necessary record format(s)?  If so, yes.  I have dozens of scripts which do this.  Each symbol/lighting device/plug-in has a unique ID, and the script matches the data from each line to the symbol using that.

     

    It's can get quite complicated.  The  basics are to use OPEN(filename) and then  create a loop to read each line and separate each cell into a variable. Find any symbol which matches the key variable, and SETRFIELD to apply the variables to the records fields.

    • Like 1
  17. I feel like this is one of those moments where 'm going to smack my head into the desk when/if someone gets me the answer, but i'm just  too brain-tired right now to get it.

     

    I have a bunch of custom tools which are in a tool pallete.   I just got a StreamDeck, and want to be able to call those tools from it.  Since there are only a few keyboard shortcuts left, those aren't a good solution to calling them.  My other solution is to create a script which calls the tools my name.  But DoMenuTextByName doesn't work for this.  I don't want it to create and place the tool, just activate it.

     

    Anyone got any solutions here?

  18. On 8/14/2020 at 12:16 AM, Jeremy Best said:

    Hi @SamIWas

     

    I can see how valuable such an enhancement would be for you and fellow power users, but based on my experience providing technical support for Vectorworks users, I suspect it would go largely under-utilised - much like the current implementation. There is another way, that can simultaneously broaden the number of shortcuts possible and coax more efficient use of the interface by more users. Maybe revisit your proposition after the release of 2021 😉

     

    If 2021 has some new way of handling shortcuts, I'll be all for it.  If they also fix the script-limit issue which has been around for 8-9 years now, that'll be enough for me!

  19. I made this request many years ago, but I'll try again.  

     

    There are now so many menu items and so many tools, that the basic keyboard shortcuts aren't cutting it.  There are only so many combinations of keys and ways you can contort your hands to run shortcuts.  And most of the possible shortcuts are already taken.  And with the rise in automated things like streamdeck and programmable mice, being able to further expand shortcuts would be very handy.  This also benefits people like myself who build large custom workspaces with custom tools and scripts.

     

    I again propose a system like Cinema 4Ds.  In addition to Command-X (or Control-X), or Command-Option-Shift-X,  allow hierarchical double-key shortcuts.  For instance, to grab the mirror tool in Cinema 4D, you press M then H (M for a mesh list, and H for mirror).  This increases the available shortcuts by multiple times and allows easy programmability for other devices.  

     

    The current shortcut system is limited to just over 200 shortcuts.  That's a lot, and it does cover the most-used tools.  But those, combined with double-key shortcuts could easily allow for well over 1000.  

     

    Obviously, this would probably kill some current shortcuts, and would require a change in muscle memory, but there would be a lot of gain on the other side.

×
×
  • Create New...