Jump to content

JBenghiat

Member
  • Content Count

    1,521
  • Joined

  • Last visited

Community Reputation

382 Spectacular

About JBenghiat

  • Rank
    1000 Club

Personal Information

  • Homepage
    https://www.benghiatlighting.com
  • Location
    United States

Recent Profile Visitors

4,752 profile views
  1. Keep in mind that pan and tilt are on top of this rotation. The x, y, z rotation values just set the reference orientation. Also, while the order that you enter rotation values doesn't matter, the lighting device will always apply in the order of z, x, y, so when a lighting device is yoked out at 90 degrees, the z and y rotations have the exact same effect. Think in terms of first setting the plan orientation of the fixture, and then either pivoting the clamp on the pipe to yoke it up/out (x axis) or pivoting the pipe (y axis). Do get the rotation you're after, either apply a 15 degree tilt after rotating ( 90, 90, 0 ), or first set your z rotation so that the yoke is parallel to the way you want the lighting device to point, and then set a 90 degree y rotation. Of course if this is a projector, it doesn't necessarily have a clamp and a yoke, so there may be a larger discussion of how to specify the orientation.
  2. JBenghiat

    Custom Data Bar

    I also create the control points in the recalculate event sink, and have a method that uses CustomObjectControlPtSet() to create all the control points. I have an enum defined for all the control point IDs. I'm using an implementation of IProviderCursorHandles to handle the control point actions, as well as set custom tool tips and images. Ended up creating a child class of CParametricCustomBar that has methods for setup, update, lock, and unlock, so I could easily use the same custom bar for the insertion tool and control points. In both cases, I'm not seeing the custom bar the very first time in a Vectorworks session. For control points, I only see the custom bar in 2D views. I tried installing and releasing the custom bar during the constructor, but that doesn't help. Otherwise, everything is working as expected.
  3. The rotation values are really a single transformation rather than sequential transformations in the order you apply them. The two sets of transformations are effectively the same, so Vectorworks recalculates to the simpler of the two.
  4. JBenghiat

    Custom Data Bar

    And I seem to be experiencing the same thing with control points — the first click in a Vectorworks session, and the custom bar does not load, but functions as expected after that.
  5. JBenghiat

    Custom Data Bar

    Thanks @Maarten DE, using CParametricCustomBar was quite useful. Vectorworks was hanging when I used the ISDK calls, and the VWPluginToolCustomBar class seems to require first initializing an array of CustomBarRefID's, which is a bit confusing. I have everything working, except that the very first time I run the tool each session, the data bar is blank. I was also hoping to use SetDataDisplayBarField to automatically handle certain data types, but that didn't seem to work for me. For a custom tool, I'm calling the create and install commands from PointAdded(). I'm overriding the OnCustomBar_ methods for setup, update, lock, and unlock. if ( this->GetToolPointsCount() == 1 ) { if ( fCustomBar.GetCustomBarID() == 0 ) { fCustomBar.Create(); fCustomBar.Install(); } } else { fCustomBar.Release(); }
  6. JBenghiat

    Custom Data Bar

    Does anyone have any advice or examples for creating a custom data bar? I can't seem to figure out the right place to call CustomBarCreate() and CustomBarInstall().
  7. The key maintains properties of the symbol but doesn’t have any Lighting Device data, so you can, for example, use the Light Info record to set colors in the Summary via Data Viz. I actually think this is correct behavior, as you can theoretically set Lighting Devices using the same symbol to different instrument types.
  8. Do we have a way to respond differently if an object is in a viewport set to Renderworks vs OpenGL? Would update support catch kNotifyRenderModeAboutToChange when the user updates the viewport?
  9. @Sam Jones The position and rotation of an object can be expressed as its translation and rotation from the origin, which in turn can be expressed as a transformation matrix. https://www.tutorialspoint.com/computer_graphics/3d_transformation.htm
  10. SetEntityMatrix() should work. You’ll first need to get the matrix so you can pass the offset back to set.
  11. For me, the field matches the value displayed in the OIP. I'm assuming you're on 2021. Make sure your accessories have weight specified and that you are running SP3. Prior to 2021, the clamp would appear as a separate item in the report.
  12. Script-based plug-ins run linearly, so the resets actually happen after the script completes. You should look at your Create scripts. There's no reason to switch the active layer — you can send any object to any layer without making it active, and if you do change the view, you should always restore it.
  13. You can store the name of the active layer and then call vs.Layer( storedLayerName ) at the end of your script — however, your refresh script shouldn't be changing your view. First determine if your reset script is changing the view (it should basically be vs.ForEachObject( vs.ResetObject, "PON='{plug-in_name}'") ) or if your data circuit object is unnecessarily changing the view.
  14. You can use https://developer.vectorworks.net/index.php/VS:OLDMassRealToStr and the other similar commands. Anywhere the mass gets stored, the units are in grams.
  15. Data gets stored in a field called WeightDouble, though it's always in grams, so you have to remember to convert the result to whatever your document units may be.

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...