Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by JBenghiat

  1. My guess is that the Render Bitmap tool is not using Redshift.
  2. Light will pass through objects with transparency, like glass, but they do not recognize shadow mapping. Redshift requires shadow-casting shaders to apply directly to lights, which isn’t something light objects in Vectorworks have ever been equipped for, so it’s not so much hobbled as not implemented yet.
  3. Currently, lights in Redshift don’t recognize shader transparency, so image projection is not possible.
  4. Do you mean on a code level? The 2D point (x, y) equals the 3D point (x, y, 0). Or do you mean something else, like converting a 2D locus into a 3D locus?
  5. This depends on the type of object, which is easier if you’re intentionally creating objects for export. The only object that gives you actual vertices is a mesh. If the objects are extrudes, you need to get the points off the planar base, the do the math to get the vertices in space. If it’s a generic solid, it can’t be done.
  6. I believe this is on the list to improve. In the meantime — shameless plug — Savvy Sequencer and Savvy Select Similar Instrument both contain options to apply numbering to all accessories (e.g. unit numbers) or only non-static accessories (e.g. channels). https://benghiatlighting.com/software/products/savvy-sequencer https://benghiatlighting.com/software/products/ssi1 Personally, I use Select Similar Instrument to select all the units in the same position, do a quick check to see that everything is in the correct position (selected as expected), and press the mode bar shortcut (“p” by default) to number.
  7. Check your path. File paths are usually relative to the script location, unless you use absolute paths (i.e. c://… or \Users\…) Possibly the file won’t actually appear on disk until you call EXL_SaveAndCloseBook()
  8. You can actually get a handle to a class, so: GetObject(className) if handle is nil return false else return type of object is 94
  9. You can do this during the widget prep event. Look at the vsoWidget calls.
  10. Take a look in the archives for examples of event enabled plug-ing. You need to take care that each event type only runs what you need. Assuming mainloop() draws your geometry, you should only call it during the reset event. Adding widgets and setting object properties should only happen during the init event. If you want the PIO to redraw based on the button press, call ResetObject(). Also note, you should catch pressing the button for all selected objects by using ForEachObject to run SetRField and ResetObject.
  11. I would start by getting TesterModule to compile and debug. It has examples of menus, tools, objects, and commands.
  12. The lighting device is a plug-in object, so you need to use CreateCustomObject(). There's not really a way to convert the symbol — conversion is basically deleting the symbol, inserting the PIO in its place, and setting the appropriate data fields to use the symbol name. Note that position detection won't be automatic, and you'll need to run ApplyLightInfoRecord().
  13. I might recommend a different solution altogether. When your plug-in is event enabled, the init event only runs once per session (or during certain events like exiting the plug-in manager). You can place your check here. (Note, in developer mode, the init event runs with every reset). You can have the the check set a value in saved setting or the string repository, so subsequent regen calls can do a quick validation check. If you really want the call to be periodic, have your regen event write a time stamp to settings or the string repository. Check the time stamp, and if your desired time has passed, send the htttp request. This sends your request at regular intervals, but only is the user is using the plug-in, which seems like it would suit your needs. These options would be simpler than going down the SDK rabbit hole. With copy protection, remember it only has to be strong enough that the price point of the plug-in is less than the value of someone’s time to defeat the protection. Also, your time in creating the protection should be less valuable than the missed revenue from the few people who can defeat it.
  14. That's a fairly broad question, and getting started with the SDK is a lot harder than scripting. I'm not even sure if a step-by-step guide, as the process has so many variables. Guidance depends on your familiarity with: - Coding in c++ - Compiling software in an IDE - Your OS and VW version - Whether the solution is for personal use or for distribution Configuring your IDE to correctly compile and test for Vectorworks the first time can be a significant task. If you have the above set, you probably need to disclose a little more about what the script does. If you're dealing with document objects, you need to make sure a file is open and the document has the expected object types. That can be tricky if you're simply running the script at regular intervals. A better approach might be to trigger on certain events, for example, document open, document save, or making the document window inactive. You can also trigger off of creating or editing certain object types. See UpdateSupport for this. You would also have to look at the interfaces for running a python script from the SDK. Because of the above, coding your actions directly in the SDK might be preferable to loading a python script, because coding in error checks is much more difficult.
  15. Another good approach if this is for visualization rather than fabrication. Apply a texture with an image-based bump that sets the depth of the surface when rendered. Use Photoshop or illustrator to create the image using gradients. 50% gray will be on the surface. White will be raised from the surface at the maximum depth set in the texture. I also forgot to mention above, after creating the loft, you can use the fillet tool if you want the recessed edges to be eased.
  16. Use a degree of 1 to draw NURBS with straight edges. You can also draw all your curves with lines and polylines, and convert to NURBS. With NURBS, the trick is creating the narrow surfaces that are perpendicular to the view plane. I would copy and paste in place all of your curves, and then set the copies to the max depth, with the originals of the curve being at the min depth. You can then use the reshape tool to adjust the depth of the curve. I would just adjust the max height curve. You may be able to then use Create Surface from Curves, but you probably have to use the loft tool. You may have to loft each section separately: each section in the image above as well as each surface perpendicular to the view. (Also, Create Surface from Curves will probably work for each section — just make sure to make a copy of the curves first.) Many have found my NURBS tutorials helpful:
  17. This sounds to me as an issue with text and viewports rather than with the Instrument Summary per se. One way to test would be to make a copy of the file and converting the IS to a group. If you still have the PDF issue, it's a viewport bug. Similarly, if you insert a callout on the design layer with the exact same text settings, that would point to an issue with PIO's and text. I know a number of users who use the IS this way, so I suspect the issue specifically affects the font you are using. That said, FYI, you can place the Summary directly on the sheet layer, using the scale parameter to set the scale. If you want the summary synchronize across multiple sheets, make it a symbol, or add it yo your Title Block Border layout. I prefer avoiding placing any objects used purely for annotations or keys on design layers, as they are outside the "world" of the design.
  18. @SamIWasYour own object or any object?
  19. For me, pDrawProvider->DrawDefault2D(); will draw a line, and not the preview of the object. I need to call: VWToolDefaultPoint_EventSink::Draw( pDrawProvider ); This is also definitely a change for 2021. Prior, I would get the object preview even without calling the default Draw() method, and that seems to be the case for all my tools. I'm also returning the two point tool status. I seem to be stuck between having the extra locus point or not seeing the object preview during rotation, which is fairly important for the application.
  20. Looks like you have a multi-cell fixture selected. Spotlight will identify a multi-cell from a symbol containing only symbols and 3D loci. If this is not desired, inserting another object in the symbol definition, like a 2D locus, will prevent Spotlight from being a multi-cell.
  21. Sam, see this thread: 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.
  22. ok, that's got me in the right direction. I'm overriding VWToolDefaultPoint_EventSink::PointAdded() If at the end of the block, I call VWToolDefaultPoint_EventSink::PointAdded(), I get the extra locus points. However, if I don't call it, after the first click, I'm not getting the preview of the object while it's rotating.
  23. No, it's an independent locus point. I'm manually selecting and deleting them after the tool completes.
  24. I have a particular custom object and insertion tool that is inserting a locus point at the first click point in addition to the object. I just searched the entire code, and I'm not actually creating this locus point, so it seems to happen either as part of some default action or because I'm not flagging something as handled. Anyone have any ideas where it might be coming from?
  • Create New...