Boh Posted March 3, 2020 Share Posted March 3, 2020 @Sam Jones here's my "blank" template file that the script doesn't like. Cheers Blank Template.vwx Quote Link to comment
Robert J Posted March 3, 2020 Share Posted March 3, 2020 (edited) @Boh I noticed that Active layer have to be Visible. Invisible or Grayed do not works even if are Active. @Sam Jones I found that GetLVis procedure cause this problem. I analyzed this script and I think this is it. Do you known how fix it? Edited March 3, 2020 by Robert J | Design Express 1 Quote Link to comment
Boh Posted March 3, 2020 Share Posted March 3, 2020 Ok confirming that for the second script to work the layer the objects are on not only has to be the active layer but also has to be set to visible. Thanks @Robert J | Design Expressfor pointing this out. @Sam Jones it easy to tweek this script to work even if the active layer is not set to visible? Quote Link to comment
Sam Jones Posted March 4, 2020 Share Posted March 4, 2020 Not near a computer right now, but first, all the objects need to be on visible layers, but only one of them has to be on the active layer. I had assumed that since the active layer is always visible the selected/is visible criteria should work I will investigate. I do not want the command to rotate objects that are not visible. I'm sure that the problem of a not set to visible active layer can be solved by adding "on active layer" as a criteria, but the actual wording of the added criteria I will have to investigate at a computer. Quote Link to comment
Sam Jones Posted March 4, 2020 Share Posted March 4, 2020 Remember there is a check box that you must check in order to rotate objects on all visible layers. If that box remains unchecked only the active layer objects will be rotated. 1 Quote Link to comment
Boh Posted March 4, 2020 Share Posted March 4, 2020 Thanks Sam, I tried toggling all the options. It was just the active layer wasn't set to visible (despite being visible because it was the active layer). Quote Link to comment
Sam Jones Posted March 4, 2020 Share Posted March 4, 2020 Change the line that says: IF (GetLVis(objLayer) = 0) THEN (I think it is 152) to: IF ((theLayer = ActLayer) | (GetLVis(objLayer) = 0)) THEN 1 Quote Link to comment
ajpen Posted January 10, 2024 Share Posted January 10, 2024 I just found this thread, and it saved me two days of randomizing the rotation of literally thousands of objects. I discovered that both @Pat Stanford's Rotate Each Object and @MarcU's randomized version thereof don't seem to work as advertised within groups. For me it was not a problem, because in my context i could ungroup all of my objects and then re-group them after randomizing the rotation, but i thought i'd mention it if either Pat or Markus have the time to look in to that. Thanks guys, these scripts are great!!!! peace aj Quote Link to comment
Pat Stanford Posted January 15, 2024 Author Share Posted January 15, 2024 Both @MarcU's script and mine use the FSActLayer call to get the First Selected Object on the Active Layer and then we step through the Selected objects. If would be possible to re-write this to check if the selected object is in a symbol or group But considering my script was last updated in 2010 and MarcU's in 2015, there does not seem to be a huge call for this. 😉 Quote Link to comment
mmiranda Posted January 16 Share Posted January 16 Hi, I don't know how to use scripts. Can I still rotate multiple objects (with different angles of rotation on its own) 180º at the same time? It would be practical if in the rotation angle box we could just write something that keeps the text on rotation and then -180º. rotatio=''X'' - 180º does this exist? Many thanks Quote Link to comment
Sam Jones Posted January 16 Share Posted January 16 Yep. Just type "-180" after the existing value and it will rotate to the arithmetic result. What is rotates around varies. Symbols will rotate around the insertion point. Graphic primitives are governed by the graphic you pick that is to the left of the X and Y values in the Object Info Palette (OIP). Quote Link to comment
Pat Stanford Posted January 16 Author Share Posted January 16 @mmirandaWhat you are asking for does not exist. While you can do math in fields in VW, there is no way to use a "placeholder variable" so you can apply the same math multiple times. Scripts are really not hard. Take a look at the old, but still useful and accurate thread: Quote Link to comment
Pat Stanford Posted January 16 Author Share Posted January 16 2 minutes ago, Sam Jones said: Yep. Just type "-180" after the existing value and it will rotate to the arithmetic result. What is rotates around varies. Symbols will rotate around the insertion point. Graphic primitives are governed by the graphic you pick that is to the left of the X and Y values in the Object Info Palette (OIP). Sam, Do you have a way to make this work for multiple selected objects without a script? The way I read mmiranda's question, is they want to select multiple objects and then type something into the OIP Angle field that will rotate every selected object by that amount. When I select multiple objects and enter a value of -45 into the Angle field, I just get every object rotated to -45 degrees, not a decrease in the angle of each object by 45 degrees. And I picked -45 instead of -180 as I thought it would be easier to see what was happening that having objects just reverse. Quote Link to comment
Sam Jones Posted January 16 Share Posted January 16 6 minutes ago, Pat Stanford said: there is no way to use a "placeholder variable" so you can apply the same math multiple times True. Pat you beat me to the correction of my reply. AutoPlot Tools for Spotlight, www.autoplotvw.com, has tools for rotating multiple objects, but I'm pretty sure scripts have been posted that do this. If you want a demo of the rotate commands in AutoPlot Tools, let me know, but @Jesse Cogswell, may have posted one. Search by that name. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.