Jump to content

Sam Jones

Member
  • Posts

    1,190
  • Joined

  • Last visited

Everything posted by Sam Jones

  1. As Josh said place a static text item and then change the item type. Do this with the pop up menu in the OIP.
  2. The functionality you originally described is possible, I think, but it is way more involved to code, and it all hinges on the correct exact name of the symbol you need being stored in Lightkey[x]. If you jump that hurdle, you have to: Build a resource list Scan the list for the symbol name Go into the symbol definition to read values you need like Instrument Type (true name Inst Type) from the Light Info Record attached to the symbol definition, and do all the steps mentioned above. So, (pause here and take a breath), how badly do you need the functionality? What you need to do is not rocket science, but it is way more involved than what you were hoping for. Kind of an interesting problem actually, but everything hinges on having LightKey[x] provide the exact symbol name. You might make a translation table of LightKey to symbol name, but that is just another step and want that would need to be maintained. BTW: NewLD.Tilt = a1 NewLD.Pan = a2 just translates to SetRField(NewLD, 'Lighting Device', Tilt, a1); SetRField(NewLD, 'Lighting Device', Pay, a2);
  3. That's how you do it. CreateCustomObject('Lighting Device', X, Y, RotationAngle); but it's going to need more info than is in the worksheet you show. It is likely you will need to either by hand or by script transfer the information from the worksheet you show to one that will then have all you need and that you will read the values from. Get the handle to the fixture you just placed with CreateCustomObject('Lighting Device', X, Y, RotationAngle); NewLight := LNewObj; You are going to need way more info in your worksheet, because you need to set the parameters of the Lighting Device, and you will need to set fields in your code that the "Lighting Device Tool" would normally pull from the symbol selected. At a minimum you will need the Symbol Name of the fixture you want to place. You can then go into the symbol definition and pull some of the information from the "Light Info Record" attached to the symbol definition. This all assumes that the needed symbols are already in the document. There will be information you want to set that is not in the "Light Info Record" that had better be in your worksheet. Getting the correct symbol name from the key referenced by the 'Qty and Code' column seems unlikely so you would have to reference some translation file or worksheet. If you have the information, setting the parameters is straight forward. SetRField(NewLD, 'Lighting Device', 'Symbol Name', 'Light Instr Martin MAC Viper Profile'); SetRField(NewLD, 'Lighting Device', 'Inst Type', 'Martin MAC Viper Profile'); SetRField(NewLD, 'Lighting Device', 'Fixture Mode', 'Martin Mac Viper Profile Basic'); SetRField(NewLD, 'Lighting Device', 'Fixture Mode', '1225W'); {Etc, etc, ...} I'm not sure what the values in your Switch Mode columns are, but you would need to figure that out and send the values to the correct parameters. Lastly, ResetObject(NewLD); None of this is rocket science, but it is a rather involved script that would be broken by entries in the Calculux worksheet that you did not match correctly/exactly. Where does the Calculux table come from? Maybe there is better way to get the information. Probably not, but maybe. How badly do you want the functionality you describe? You might aim lower by making a script to mark the locations with loci or a symbol and then placing the lights by hand with the Lighting Device Tool. It would be nice to use CallToolByName() in your script, but doing that with the Lighting Device Tool makes you click on locations to place the lights.
  4. Scripting is a lot easier than most people think, but it is not as easy as Michael makes it out to be. It was for him, but if you did not have any computer class that introduced you to programming, you're screwed. OK, it's not that bad, but learning about variable types and assignment, flow of control, and conditional testing can be daunting without a guiding hand. As I said at the beginning, it is easier than most people think, but the entrance requirements are usually a big need for simplifying a repetitive simple task, and someone to point the way. BTW, if you find such a often performed, simple task, the "Customization" forum is filled with people who will help guide you to creating your first command or tool. Spending way more time in helping you than you thought would ever happen. All the above being said, many of us that script in VW look at the work of other scripters, and decide that reinventing the wheel is not worth it, and we purchase the work of others. Some reinvent the wheel, and sometimes make a better wheel. In that way better defining both the task and the workflow to attack it. Sometimes they do that with existing VW commands improving the workflow VW attempted to simplify. This statement is crucial. There are going to be times that users create tools that the people at VW never imagined or imagined wrong. The scripting environment that has been provided by VW is the most important tool it has provided to any user. If you don't script, you have benefited from the work of someone who has no matter what your industry focus is. Embrace that, and your life with VW will be much more pleasant. Nobody, wants to spend more money, but how badly (how much time or mental effort is saved) do you need the functionality that VW failed to provide in the shipping program? Understand that by providing a scripting environment, they kind have covered all the bases.
  5. It can happen if you are working on a drawing that someone else has started dropping Lighting Devices (LDs) into. Those LDs will show the OIP used by the person who placed them and will be the starting default going forward. You will need to go to and select File / Document Settings / Spotlight Preferences. In the resulting dialog, select "Parameters" in the left hand column. In the "Settings" drop down menu, select "<Spotlight>, and this will return the OIP to the Spotlight default display. Of course, you could also make your own custom display.
  6. Additionally, which is the more time consuming and irritating task for the crew, putting clamps on the ones that need them or taking them off the ones that do not. Alternatively, finding the appropriate fixture and clamp configuration for the position.
  7. Also, the thought of having to assign a clamp to each fixture I drop is very irritating. I have a script and VW has mode that will allow for the assignment of accessories to groups of objects, but having to do so is still more irritating than counting fixtures with clamps, or alternatively the ones without clamps.
  8. Let first say that how SSS performs with Lighting Devices is quite marvelous and very helpful. As for my preference in fixture/clamp configuration, I much prefer to keep the clamp as part of the fixture. I have no need to count clamps. I count fixtures. If necessary, I count the fixtures that don't need them. Side arms and similar steel are another matter. I count them separately, and not as accessories. I fear this is just me. That kind of granularity I prefer to keep in data records, not separate drawing objects.
  9. Cool. How do you use Powerpoint for cable planning and/or power planning?
  10. AutoPlot's "Select by Channel Ranges" command http://www.autoplotvw.com/APSL_Download.asp
  11. Such a script menu command exists in AutoPlot Tools for Spotlight, attached but encrypted, but this task is an excellent way to start scripting. Since I sell a solution let me just say that you probably want to be sure to be careful of the "visual", = (V), criteria in whatever "ForEach..." command you try to go with. If have "Show" or "Show/Snap" layer criteria selected it is possible to select objects on layers that are visible, but will not display selected objects. This has bitten many a command in the ... . Attached command uses the dialog below, and automatically enters the values from the first selected Lighting Device on the active layer. Select by Field(s) Value(s).vsm
  12. @Chris J Clarke Place the attached plug-in into the "APS_Plug-ins" folder, and restart Vectorworks. Then place the "Total Accessories by Layer" command into your workspace. It is in the "AutoPlot Tools" category in the Workspace editor. Let me know how it goes. Total Accessories By Layer.vsm
  13. Unfortunately, if the two studios are in the same drawing, the command will combine all the accessories in to the into one worksheet every time you run the command. You would need to have each studio in its own file. The most time consuming part of making the command able to filter by layer, is creating the user interface to provide that choice. I will see if I can whip out a command that will only make worksheets by layer, and then work on the UI later. No guarantees, so it's unlikely to get to you in time, but we'll see.
  14. AutoPlot Tools for Spotlight has a command "Collect and Total Accessories". It produces the attached worksheet (image of). It only does it for the entire file; I will look into providing layer filtering.
  15. Actually, it does do as advertised. It turns off all the beams. You also want it to restore the shaded mode. What shaded mode should it return to?
  16. I would like to convert a symbol to a group and then scale the group. Converting the symbol is easy with , but getting a handle to pass the HScale2D routine seems to fail. The code below fails, and yes the FSActLayer is a symbol. PROCEDURE UnGroupAndScale; VAR Obj :HANDLE; Grp :HANDLE; X, Y :REAL; BEGIN Obj := FSActlayer; GetSymLoc(Obj, X, Y); SymbolToGroup(Obj, 2); HScale2D(LNewObj, X, Y, 0.2, 0.2, TRUE); ReDrawAll END; RUN(UnGroupAndScale); So how should I do this? TIA yet again.
  17. @markdd Hi, You have AutoPlot Tools. Take a look at the "Collect and Total Weight" command.
  18. No. Have never used ChatGPT. I don't know how to ask it to do anything or where to find it. That will be more work than anything else.
  19. Still usually true. If you don't do it a lot, don't bother to script it. (Unless you have fun scripting. See @Pat Stanford 's many script replies.) As a third party developer, creating the command used occasionally by many is close enough. The ChatGPT is well laid out and clear. I probably would not thought of ExtrudeAlongPath() function. I'm curious to see what it produces, after all the errors you mention are corrected. Although ChatGPT does not seem like it is of any use (yet) for templating (a word?) any mildly complex commands, I will be curious if it can throw up a structure for some of the simple commands that I sometimes throw together.
  20. Nope. It would seem that PIOs are not a resource. I hope I'm wrong about that but ResListID := BuildResourceList( 47, 0, SubFolder, NumResources ); FOR Index := 1 TO NumResources DO BEGIN ResName := GetNameFromResourceList( ResListID, Index ); ResHdl := GetObject( ResName ); ResType := GetType(ResHdl); IF (ResType <> 86) THEN BEGIN failed. ResType always yielded "47" for the PIO name. (I used the extra variables and lines for debugging purposes).
  21. It is possible to create a list of records in a document using the BuildResourceList( 47, 0, SubFolder, NumResources ) which will produce a resource list of record definitions. Some Questions: Is it possible to filter this list build to not include PIOs? If not, is it possible to look at the resulting list and identify the record definition, obtained with GetObject(GetNameFromResourceList( ResListID, Index )), that is a plug-In, or identify it as not a plug-in? The goal here is to produce a list of records in a document that do not belong to plug-in objects, like the list in the Data Pane of the OIP.
  22. I use Monterey, Mac OS 12.4 on an M1 Max without issue. It crashes, but only when I'm scripting and doing weird stuff. It is likely that 12.4 is as early as you can go with an Apple M1 chip
×
×
  • Create New...