Search the Community
Showing results for tags 'hanging position'.
Found 4 results
So I'm writing a script that requires the X and Y co ordinates for the Center of a Hanging Position, this I can get no problem using vs.HCenter() the problem i'm having is that if you have the position name turned on for that position, it takes that into account for the Center Co Ords (from what I understand this is because it's taking the center of the Bounding Box for the HP), meaning that the returned values aren't actually centered on the HP itself. My work around for this was to add in something that turns off the HP Name whilst the script is running. This works fine, however the problem i'm having is the Co-Ords are not updating after I have disabled the POS Name until AFTER the script has finished running. E.g: Co Ords with POS Name turned on = 300, 100 Co Ords after POS Name Disabled = 300, 100 Manually getting HP Co Ords AFTER script has Finished = 100, 100 I've tried adding in vs.ResetObject() and vs.ReDrawSelection() but to no avail. Code Below: import vs objectHandle = vs.FSActLayer() vs.SetRField(objectHandle, 'Light Position Obj', 'Position Summary', 'False') # Sets Show Position Name to False vs.ResetObject(objectHandle) vs.RedrawSelection() hpX, hpY = vs.HCenter(objectHandle) # Gets Center of HP symname = vs.GetRField(objectHandle,'Light Position Obj', "Symbol Name") # Gets the Symbol name from HP record symHandle = vs.GetObject(symname) # Gets the Symbol's handle from the POS name (p1X, p1Y), (p2X, p2Y) = vs.GetBBox(symHandle) # Gets co ords of Bounding Box vs.Message(str(p1X)+str(p1Y)+str(p2X)+str(p2Y)) vs.Rect(p1X,p1Y,p2X,p2Y) # Creates Rectangle from Sym Def Bounding Box @ 0,0 on document rectHandle = vs.LNewObj() # Gets Handle for newly Created Rectangle rectX, rectY = vs.HCenter(rectHandle) # Get Center of newly created Rectangle X = hpX - rectX # Calculate X Distance Y = hpY - rectY # Calculate Y Distance vs.Move3DObj(rectHandle,X,Y,0) # Moves Rect to HP Center Is there some other command I need to run to recalculate the objects Co Ordinates?
I'm currently working on a couple of plug ins that need to interact with Spotlight Hanging Positions. The first thing i'm trying to do is get the total length of a hanging position. Thanks to some excellent topics and replies from @Sam Jones and @JBenghiat I've got my head around accessing the objects within the hanging position group, and the different kinds of objects I may expect to find within, and iterating through the objects to get the total length. My question is: For HP's containing Truss PIOs is it better practice to use the TrussItem parametric record or the Truss Record for getting the length? From what I can gather the TrussItem Length field is affected by the units of the active documents units, whereas Truss Record appears to always be in metric mm. I think using the Truss Record probably makes more sense as then I have a consistent set of units and don't need to worry about logic to work out the units of measurement. I just wanted to try and get some confirmation if my thinking was in fact true or if i've missed something. Secondly for HP made up of individual symbols (so no truss record) is there a way to get either the symbols total length or the even more directly the HPs total length? For bonus points are there any good resources floating around that deal with the inner mechanics of Spotlight? Pretty much everything I've managed to do with spotlight so far has had to be learnt through trail and error! Thank you in advance
So it sounds like Hanging Positions are being phased out. If we are to switch to 'Insert Truss' tools, I have a few questions. 1) I'd like to have a data tag that shows truss system name, trim height, and length. I can make a tag that shows system name and object trim height, but I can't get the system length, only the length of 1 piece. Also, this only works if the truss is a system, not a group or a hanging position. Having to go to the OIP to select the system every time you want to move it is a pain. 2) I'd also like to make a worksheet with system name, overall truss length, trim height and truss counts. Similar to what you see when you use 'Replace truss'. I can make a worksheet with System name and components, but not quantities or trim. Anyone have suggestions on how to work make this work? The tutorials and Vectorworks U are obsolete. Truss Tags.pdf
Is it possible to replace truss that has been converted to a hanging position? I built a lighting rig and then found out that the supplier changed the size of the truss from what was in the drawing. I'm trying to change the type of truss in the hanging position but can't seem to do it as a group operation. I can delete each individual piece of truss and replace it one-by-one but that will take me forever. I've edited the position, selected the truss, tried replacing the truss but I can't seem to find a way to do it. Ideas? Thanks.