Sam Jones Posted March 10, 2021 Share Posted March 10, 2021 Is it possible to create a Hanging Position from a symbol or other object using vectroscript? Quote Link to comment
Pat Stanford Posted March 10, 2021 Share Posted March 10, 2021 Under Truss Analysis section of the VS Function Reference did you look at: HP_ConvertToHangPosTruss Analysis Vectorworks 2019 VectorScript Declaration: PROCEDURE HP_ConvertToHangPos ; Python: def vs.HP_ConvertToHangPos(): return None Description: Invkoes the Convert To Hanging Position menu command on the systems of the selected objects. Quote Link to comment
Sam Jones Posted March 10, 2021 Author Share Posted March 10, 2021 That got me further along but not far enough. It throws up a dialog that asks for a Position name. I need to be able to specify the name in the creation command. Probably doesn't exist, but something like HP_ConvertToHangPos(PositionName:STRING); Quote Link to comment
JBenghiat Posted March 10, 2021 Share Posted March 10, 2021 A hanging position is just a PIO, so you can just insert as a custom object and set the fields. If you want it to be geometry based, put the object you’re converting into the profile group. Note, the universal name is something like Light Position Obj. Debug List View is your friend here. 2 Quote Link to comment
SamIWas Posted October 20, 2023 Share Posted October 20, 2023 Trying to get more info for this. @Sam Jones, did you ever get this working? I'm looking to make some very simple PIOs that can automatically be hanging positions, but still be editable using the PIO fields. An example would be a truss with an Ibeam along the bottom (used a lot in film sets) where I can draw the truss, and the beam, and have the beam portion be a hanging position. Or the whole thing is fine I guess as long as I draw it correctly and the fixtures will snap to the bottom center of the PIO. Quote Link to comment
JBenghiat Posted October 20, 2023 Share Posted October 20, 2023 @SamIWas You raise several questions here. Any object can be turned into a Hanging Position, and this can be accomplished with VectorScript. This would be the same as selecting the object, then choosing the Create Hanging Position command. In order to modify the geometry, you would have to edit the Hanging Position’s profile group. If you are asking if any object can be turned into a Rigging Object so that it directly interacts with Lighting Devices and loads, but still has options available in the OIP (without editing the profile group), then no. Rigging Objects need to be able to “answer” a certain set of questions that Vectorworks “asks” of them, and this is only possible via the SDK. In terms of snapping to the I-beam, this also wouldn’t be possible without the SDK. You can, however, place a Lighting Pipe at the bottom of the beam, and turn off the “draw pipe” option. This will give you a snappable line with the possibility of tick marks. You can definitely place a Lighting Pipe inside another PIO, but I’m not sure if it will still be detected as a rigging object. What you envision is definitely possible with the SDK. In VS, you can design a custom tool that draws a beam, places a Lighting Pipe for snapping, and wraps them in a Hanging Position. Quote Link to comment
SamIWas Posted October 20, 2023 Share Posted October 20, 2023 (edited) 2 hours ago, JBenghiat said: @SamIWas You raise several questions here. Any object can be turned into a Hanging Position, and this can be accomplished with VectorScript. This would be the same as selecting the object, then choosing the Create Hanging Position command. In order to modify the geometry, you would have to edit the Hanging Position’s profile group. If you are asking if any object can be turned into a Rigging Object so that it directly interacts with Lighting Devices and loads, but still has options available in the OIP (without editing the profile group), then no. Rigging Objects need to be able to “answer” a certain set of questions that Vectorworks “asks” of them, and this is only possible via the SDK. In terms of snapping to the I-beam, this also wouldn’t be possible without the SDK. You can, however, place a Lighting Pipe at the bottom of the beam, and turn off the “draw pipe” option. This will give you a snappable line with the possibility of tick marks. You can definitely place a Lighting Pipe inside another PIO, but I’m not sure if it will still be detected as a rigging object. What you envision is definitely possible with the SDK. In VS, you can design a custom tool that draws a beam, places a Lighting Pipe for snapping, and wraps them in a Hanging Position. Hmmm...okay. I'll have to look into that and how to create the lighting pipe inside a PIO and make it invisible. That would absolutely work for everything I want to do. Because I also want to create my own pipe PIO because you can't texture the Lighting Pipe or the straight truss tool, unless the texture is a class texture (and then, you can't turn it off!). You also can't just apply a generic color to the pipe, and a grid of bright white pipes looks ridiculous. If either of these are possible, I haven't found it. Very annoying, and I want to fix that! Edited October 20, 2023 by SamIWas Quote Link to comment
SamIWas Posted October 20, 2023 Share Posted October 20, 2023 36 minutes ago, SamIWas said: Hmmm...okay. I'll have to look into that and how to create the lighting pipe inside a PIO and make it invisible. That would absolutely work for everything I want to do. Because I also want to create my own pipe PIO because you can't texture the Lighting Pipe or the straight truss tool, unless the texture is a class texture (and then, you can't turn it off!). You also can't just apply a generic color to the pipe, and a grid of bright white pipes looks ridiculous. If either of these are possible, I haven't found it. Very annoying, and I want to fix that! EDIT: Ha! My first attempt left Vectorworks with all greyed out menus and no way to get out of it. So CallTool(47) without some way to complete it was not the answer! 😂 Quote Link to comment
JBenghiat Posted October 20, 2023 Share Posted October 20, 2023 CallTool isn't going to work for you. The tool will want to collect two points, then (I recommend) use vectors to calculate the length and rotation. Use the CreateCustomObject commands to place the pipe and/or create a Hanging Position. The universal name for the Hanging Position is "Light Position Obj". Use SetRField to set parameters. I know there's been posts on the forum about DebugListView, which can help you find universal names and hidden parameters. You can also construct a sample Hanging Position and examine the output of Export VectorScript. The pipe is path-based, so either call CreateCutomObjectPath, or set the path group after creating the object (the path should be a polyline). Any geometry in the Hanging Position needs to be inserted in its profile group. The trickiest thing is translating been the plug-in's internal coordinates and the coordinates of the overall world. Quote Link to comment
SamIWas Posted October 20, 2023 Share Posted October 20, 2023 (edited) 17 minutes ago, JBenghiat said: CallTool isn't going to work for you. The tool will want to collect two points, then (I recommend) use vectors to calculate the length and rotation. Use the CreateCustomObject commands to place the pipe and/or create a Hanging Position. The universal name for the Hanging Position is "Light Position Obj". Use SetRField to set parameters. I know there's been posts on the forum about DebugListView, which can help you find universal names and hidden parameters. You can also construct a sample Hanging Position and examine the output of Export VectorScript. The pipe is path-based, so either call CreateCutomObjectPath, or set the path group after creating the object (the path should be a polyline). Any geometry in the Hanging Position needs to be inserted in its profile group. The trickiest thing is translating been the plug-in's internal coordinates and the coordinates of the overall world. I was just coming to respond that I got it started with CreateCustomObject. I managed to get it to draw a pipe, but only 1m long no matter what I assigned to the record fields. It also wouldn't take on a diameter from 'Lighting Pipe','PipeW' (which is what I got from the worksheet as the parameter name. So, I will look into the createcustomobjectPath. I'm not quite sure what you mean by "the profile group" however. What's odd, and this may be related to what you are talking about here, is that no other objects draw in the plugin. I have a few random extrudes just as test pieces, and they do not draw. I'm guessing this has to do with the profile group thing you mention. I will also look into this debugview. I have read about it on other posts, so maybe that is something I need. Edited October 20, 2023 by SamIWas Quote Link to comment
SamIWas Posted October 20, 2023 Share Posted October 20, 2023 (edited) 2 minutes ago, SamIWas said: I was just coming to respond that I got it started with CreateCustomObject. I managed to get it to draw a pipe, but only 1m long no matter what I assigned to the record fields. It also wouldn't take on a diameter from 'Lighting Pipe','PipeW' (which is what I got from the worksheet as the parameter name. So, I will look into the createcustomobjectPath. I'm not quite sure what you mean by "the profile group" however. What's odd, and this may be related to what you are talking about here, is that no other objects draw in the plugin. I have a few random extrudes just as test pieces, and they do not draw. I'm guessing this has to do with the profile group thing you mention. I will also look into this debugview. I have read about it on other posts, so maybe that is something I need. Oops...accidental quote. Edited October 20, 2023 by SamIWas Quote Link to comment
SamIWas Posted October 20, 2023 Share Posted October 20, 2023 5 hours ago, JBenghiat said: You can, however, place a Lighting Pipe at the bottom of the beam, and turn off the “draw pipe” option. This will give you a snappable line with the possibility of tick marks. You can definitely place a Lighting Pipe inside another PIO, but I’m not sure if it will still be detected as a rigging object. I managed to get the PIO to draw the pipe and apply all of the relevant info into the fields to make the pipe act how I want. But, yeah, I don't think it can be detected inside the PIO as a rigging object. I don't even care about rigging analysis...I just want the lighting device to pick up the position name and move if the PIO is moved. That's a bummer. 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.