Jump to content

michaelk

Moderator
  • Posts

    6,349
  • Joined

  • Last visited

Everything posted by michaelk

  1. @spettitt I'll attach 4 simple plug-in objects. Two are examples I made for someone else for just exactly this reason. Rect Point Example and Rect Rect Example. They show two ways of making a rectangle tool. One is defined as a point object and one is defined as a rectangle object. Obviously the rectangle object is better at making rectangles. Then there is a fancier rectangle object. RK Rectangle. You should also have a 2D/3D Hybrid plug in so, I included a plug-in that gets bogged down when the object is too big. Pat's Grate 3. There is a circle of life when it comes to making your own plug-ins. You start with scripts that get more and more complicated and useful. Then when it comes time to make the jump to plug-ins, one of those who has gone before guides you through the steps and a vast universe of possibilities opens up. You realize that plug-ins are easier to write and more efficient to use. After several years of joyful plug-in creation you are horrified to learn that there is another plateau to climb: Event Aware Plug-ins. Again, a guide appears to walk you through the comically complicated steps. Then someone who is successfully and happily writing scripts asks how to make a plug-in! The circle goes on. Rect Point Example.vso Rect Rect Example.vso Pats Grate 3.vso RK Rectangle.vso
  2. That's how symbols behave. Editing one makes them all change. You will probably want to have a different symbol for each type of table layout. (Or you're welcome to try this: https://www.verysmallgroup.com/table-seating. It will make parametric tables that can each have different kinds and numbers of chairs on each side.)
  3. That report is a worksheet and lives in the Resource Manager under Worksheets. You can import/export it between documents or just copy the worksheet on the page of one drawing and paste it into another. That will also cause the worksheet to appear in the Resource Manager of the new drawing.
  4. Are you dragging it in? Using the import command? Referencing?
  5. Looks like you have the Clip Cube turned on. View > Clip Cube
  6. @javiik I get this when I try to open your file:
  7. That file was created with the student version of VW. Professional licenses can't open it. Sorry.
  8. Can you send me the file? Make sure you have a name in the room name field of the OIP.
  9. The kobj… lines are constant definitions. Later on in the code the coder will want to use the integer value for OnWigetPrep and rather than look it up or remember a hundred of these numbers they are defined at the beginning of the code in the CONSTANT section. The functions that require those values are used when the plug-in object is "event aware". Event aware plug-ins can do things like have Styles that are recalled from a stored symbol in the resource manager. They don't show up in the reference because they aren't functions. They are a common practice. Not part of the language. It's entirely possible that we are all copying that from @Julian Carr and @JBenghiat. Don't worry about that for a while. You will have a few years of joyfully improving your productivity by making useful tools and menu commands before it seems like a good idea to subject yourself to that torment. Maybe by then ChatGPT will be able to write plug-ins for us :-).
  10. My experiments with ChatGPT and Vectorscript always return VERY verbose code at the very best. Often ChatGPT hallucinates functions. And it can't handle plug-in objects very well - if at all. The good news is you need MUCH less code than you think. That's the beauty of writing plug-in objects. It can't handle the plug-in definition at all. And I'm not sure from your example that you are defining the plug in. If you want to make a plug-in object that draws a square of parametric values using a point plug in: In Vectorworks, go to Tools>Plug-ins,>Plug-in Manager… Chose New. Give it a name and select Point Object. In the parameters tab do this: The name in the Name column is what you use in the script (with a p prefix). The Alternate Name is what appears in the OIP and in a worksheet. Believe it or not, this is the entire script you will need: PROCEDURE ParametricRectangle; BEGIN RectangleN( 0,0, 1,0, pRectWidth,pRectHeight); END; RUN(ParametricRectangle); pRectWidth and pRectHeight will be the values in the OIP for Rectangle Width and Rectangle Height! Changing the values in the OIP (or in a worksheet) will change the size of the rectangle. RectangleN is a standard way of drawing a rectangle. The first two numbers are the starting point. With plug in objects the insertion point of the object is 0,0. The next two numbers define the direction of the base of the width of the rectangle. 1,0 means it goes to the right and not up or down. -1,0 goes to the left. 1,1 goes at a 45º angle up and to the right. The actual values don't matter. Just if they are negative, zero, or positive. The last numbers are the opposite corner of the rectangle. You don't have to write them as 3 lines. I just find that easier to read. If you want to make a plug-in object that draws a square with handles at the corners: In Vectorworks, go to Tools>Plug-ins,>Plug-in Manager… Chose New. Give it a name and select Rectangle Object. For a Rectangle Plug-in Object it will automatically add the width and height parameters! So, without even lifting a finger the parameters will look like this: The script will be something like this (I added diagonal lines just to give it something to do :-): PROCEDURE RectRect; BEGIN RectangleN( 0,(0-(pBoxWidth/2)), 1,0, pLineLength,pBoxWidth); MoveTo(0,-pBoxWidth/2); LineTo(pLineLength,pBoxWidth/2); MoveTo(0,pBoxWidth/2); LineTo(pLineLength,-pBoxWidth/2); END; RUN(RectRect); With this plug-in you can either drag the handles of the rectangle or type in values in the OIP. Note that this plug-in will have two insertion modes. The second one is the one that makes sense. But I don't know any way to make that the default :-). In the second insertion mode the linelength is the first line you draw and the boxwidth is what a human would think of as the height. For reasons someone may soon tell us, but unknown to me for many years, the boxwidth (height) is measured from the middle of the rectangle. So you have to do the division by 2 business. I'll attach these two plug-in objects so you can take them apart and see how they work. Let me know if you need help installing them. Post back with any questions. Welcome to a lifetime of madness. EDIT: Should have mention in directions above. After you create the plug-in object you still need to add it to a workspace so it will show up in a tool palette or menu. Rect Rect Example.vso Rect Point Example.vso
  11. I wonder if the OS matters. Is this an issue on windows 11 and not on Macs?
  12. That's not what I'm seeing in 2024. When the Move By Points tool is active and the first mode is either Move and Duplicate Mode or Distribute Mode, then hitting the P key will highlight the current entry in the Number of Duplicates field so that typing any number will replace the current entry.
  13. Yes. The criteria is LOCATION. When you use Location the choices are "is within" and "is not within" and then you will see a list of possibilities. By default the space objects will have a UUID # that is I think 16 hexadecimals inside curly brackets. If you click on a space object that same UUID will be in the Name field at the very very bottom of the OIP. You can change that to something more human readable and that new name will appear in the criteria list. If you want to go the other way and your space objects have names in the Space Name field, then you can use the call =GetSpaceNameforObj in the database header row and it will return the room name for all the spaces that object is contained within, separated by a comma.
  14. Just post the .vwx files here and someone will convert them for you.
  15. @Alex11 Not that I know of. If you send it in a PM to me or another moderator we can do it for you.
  16. It was. I met Richard Diehl once and he told me about writing the original MiniCad in a version of Pascal (Turbo Pascal??) that would compile on his (I think…) Mac 512.
  17. Just learned that Niklaus Wirth passed away on January 1, 2024. https://en.wikipedia.org/wiki/Niklaus_Wirth You could argue that Vectorworks wouldn't be what it is without him.
  18. VW>Preferences>User Folders>Reveal in Finder Find the Plug-ins folder. Put the .vsm file in that folder. (I find it very useful to make the user folder a favorites in Finder) Restart VW. Tools>Workspace>Edit Current Workspace (or choose Workspaces… and create a new workspace based on a copy of the current one) in the Workspace Editor > Menus Tab On the left will be groups of menu commands. Jesse's are usually in a group called JNC. Find the menu command you want On the right are a list of all the menu commands in that workspace in VW. Open up the target menu group and Drag the new menu command on the left to the desired location on the right. Hit OK. As a bonus, you could just grab the JNC heading on the left and drag it to the right. You will now have a JNC menu. I'm currently using 9 JNC menu commands!
  19. Are they attaching a script to the saved view?
  20. You may have found a bug. Here's one workaround: Pull the windows out of the wall. In Settings>General set the Insertion Relative to: Center of Jamb. Reinsert the window. Offset as necessary.
  21. First remove the texture from the stair object in the render tab of the OIP. Then go to the graphic attributes of the stairs and set the texture of every part you need of the stair. I usually make a version of the texture where the hatch is turned 90 degrees just in case. segmented stair fixed.vwx
×
×
  • Create New...