Jump to content

JBenghiat

Member
  • Posts

    2,028
  • Joined

  • Last visited

Everything posted by JBenghiat

  1. Benjamin, Make sure you have the latest version. This was fixed in 1.0.1 and works for me. If you still have issues numbering inside a group, please contact me off-list. Thanks, Josh
  2. Hi Benjamin, Focus points require the name of the FP object to match the data shown in Object Info. First, make sure you have the latest version of Savvy Sequencer, 1.0.3. In addition to selecting the "Name" field in data settings, check the option to "Copy data to Name field." Note, this is a potentially confusing example, as the Focus Point has a data field called "Name," in addition to the name field provided for every Vectorworks object. Lighting pipes and positions need a similar procedure. HTH, Josh
  3. As you're changing parameters, make sure you have developer mode turned on in preferences. This causes VW to initialize the plug-in on every regeneration, which refreshes the UI if you have custom buttons. Otherwise the initialize even only runs once per Vectorworks session, and you have to quit and restart VW. The PIO will generally need two triggers to reset the Obj Info UI -- one is to cause the init event to run by having the geometry refresh, like toggling a check box. Next you need to re-draw the OIP by de-selecting and then re-selecting the object. This used to cause some potential instability, which I think got fixed in 2015. If you are still using 2014, I recommend deselecting, then right-clicking on a PIO and choosing the Properties option. This seems to be a much more stable refresh of the UI, though you will still need to touch a parameter for it to redraw. Once you update the OIP UI for one object, you shouldn't need to do this again. If you are opening documents with the old PIO on fresh sessions of VW, the OIP should be correct on the first selection. HTH, Josh
  4. Don't spend too much time on perfection, then. I do, however, find small imperfections can suddenly make a script crash in future versions. States will tell you why a plugin is regenerating -- move, parameter change, layer change, etc. I don't think you need any special handling in your resource event, so it's not necessary. If you were to want the object to be state aware, you would set some options in the init event and add the addState event to you event cases. There are a few instances where the handle will be nil. Off the top of my head, clicking on the preferences icon in the mode bar is one of them. -Josh
  5. Jeff, It's not you, elliptical beams have had issues with both bottle rotation and beam angles. I reported this as a bug a while ago. As a shameless plug, you may want to take a look at Beam Draw http://benghiatlighting.com/software/products/beam-draw-4. One tools specifically lets you visualize PAR beams. -Josh
  6. There is no reason that turning off developer mode should cause your issue, unless your case statement isn't set up right. I tried your vso, and it worked fine for me even in developer mode, except that the object would occasionally crash VW. A few suggestions: You shouldn't need vsoState clear, as you haven't set up your object to accept states. Before CreateText, check that Len( text ) > 0 I recommend against testing for HParm = NIL. There are some cases where you want the NIL case to be handled, like inserting the object. My guess is your issue lies with the PickObject call -- it's fairly old and may be causing a memory leak. Try the FindObjAtPt commands, which might be more stable. -Josh
  7. You can use the instrument summary, with the only item being a label legend specified as your "typical" symbol. This also scales the symbol, allowing you to place it directly on a sheet layer. Personally, I have a typical symbol that I converted to group and scaled to work on a sheet layer. I made this into a new symbol, which gets inserted with my "blue" title block symbol, along with notes, revisions, etc. -Josh
  8. Your script works for me. The only think I can think of is that the main name of your parameter should be "area" and not your alternate name. I would also recommend placing your set field section in the button 1 case. Delete the ResetObject call in your main code. If uncommented, this could cause an endless loop.
  9. Sounds like you are on the right track. SetRField should only be in the button event. What does your SetRField look like? Does your call work from the main reset part of the script if you use a test string? A button event won't reset the object to display the new data. Add a ResetObject() call to cause the PIO to regenerate. -Josh
  10. The function reference in the developer wiki is more comprehensive than that in the help. You can both search the page for a function name, and there is a site search function. http://developer.vectorworks.net/index.php/VS:Function_Reference The new image controls have actually been around for a while -- since VW 2012. What has changed is the resource file format, as well as the SetVSResourceFile command. Setting the image isn't deprecated per se, but the command that loads a resource file into memory is. The one thing that has changed completely is string functions. Because of the resource file update, this switch happened fairly abruptly. Usually, deprecated functions will simply generate warnings for a few versions before they disappear completely. HTH, Josh
  11. The command you want is UpdateImageControl2. http://developer.vectorworks.net/index.php/VS:UpdateImageControl2 As the command takes a path to the image in your resource package, you don't specify a resource file elsewhere.
  12. Resource files were totally re-worked for 2015. See Kevin's link to the developer wiki above. The page explains the correct format for resource files. If you scroll down to the bottom of the page, you can find information on the new vs routines. Once you get the hang of it, managing resources actually becomes much easier. -Josh
  13. To reiterate Jim's comments, what you describe is expected behavior. Viewports maintain layer and class visibilities independently from document settings. Sheet layer objects respond to document visibility settings, just like design layer objects. Either edit your saved views to show or ignore the "Title Block" class or assign your key to another class that is always visible. -Josh
  14. Are you providing feedback to a user or for trouble shooting? You can build a custom dialogue with a scrolling text box for UI. For testing, write to a log file. -Josh
  15. You don't really fillet an object, you fillet between two line segments. To fillet a NURBS curve, you have to specify a non-endpoint vertex (as a way to ensure the selection of two segments) and assume that those two segments are straight. What are you ultimately trying to model? Does the radius need to be precise, or are you just trying to round off transitions? -Josh
  16. Short answer -- yes, you can provide a directive to VW's encryption process to include modules. Just as with encrypting VS, the module gets sucked into to the distributed plug-in. They key is including an xml file with the same name and in the same location as the plug-in you wish to package. {full path to plug-in to encrypt} {relative path to module file 1} {relative path to module file 2} Notes: - The xml flags are case sensitive - Use the Path parameter if you are packaging a file the resides outside of your plug-ins folder (I keep all my code files in Dropbox and manage with git Example: I have a project in: Users/myname/Projects/Project 1 In the Project 1 folder I have: |_ _Encrypt |_ thePlugin.vso |_ thePlugin.xml |_ lib |_ __.init__.py |_ piolib.py |_ thePlugin |_ __.init__.py |_ _main.py The xml looks like: /Users/myname/Projects/Project 1/_Encrypt/ thePlugin/_main.py lib/piolib.py It's been a while since I got this working smoothly, so feel free to contact me privately with questions. -Josh
  17. Your easiest approach would be to start with a 2D poly and convert to NURBS. With Add2DVertex, you add the vertex coordinates as though the fillet is not there and specify a radius. -Josh
  18. The summary will build a key for any symbol with a Light Info record attached. You can attach the record and manage its data via the Lighting Symbol Maintenance command. In order for the summary to display counts, however, the symbol must be placed in the drawing as a Lighting Device. -Josh
  19. Hybrid PIO's can't insert on an alternate plane (when you extrude, it becomes hybrid). You may be able to get the plane of the path and manually adjust your 3D geometry accordingly. If you are creating a true top/plan view (as opposed to a schematic for the 2D view), you also have to adjust the plan view to match the rotated plane. -Josh
  20. Hi Jeremy, Create a symbol with all three components, and assign the light info record (if you don't have one already). You can also use lighting symbol maintenance to add the symbol to the list. Make sure the type and wattage match for all the parts as well as the composite symbol. In the summary list, add the composite symbol (it will be flagged as unused). FYI, the composite symbol can be anything, like a shortened strip with a break line, as long as type and wattage fields match in symbol maintenance. -Josh
  21. The issue you observe is a result of a user-defined origin. Certain plug-in fields adjust their displayed values based in the origin offset. It's a bit of a long-standing bug. Using the control point to adjust the footprint should function as expected. -Josh
  22. IES files are an open standard and the data is a simple text file. Vectorworks use of the IES file is part of the rendering algorithm, so there is not really a way to access RW's calculations from an API. You can read data from the IES file and perform calculations. Perhaps searching for a Python IES library would be the first step. -Josh
  23. Are you trying to create a light for rendering or visualize beam coverage with "Show Beam." If the latter, the "Vertical beam" option seems to have a bug. You can, however, get a good idea of coverage with the solid beam option in non-vertical mode. -Josh
  24. I reported the bug with 2014. It looks like it will take some time to fix. -Josh
×
×
  • Create New...