• Content count

  • Joined

  • Last visited

Community Reputation

25 Great


About JBenghiat

  • Rank
    500 Club

Personal Information

  • Homepage
  • Location
    NY, NY
  1. The tick marks are lines, and like any lines can have arrow markers at the end. Either through class attributes or through the attributes palette, you have turned on arrows for the ticks. -Josh
  2. It's been that way for years (10+?) -- it's actually a shortcoming of the PASCAL language on which vs is based. The "fix" is actually python support. -Josh
  3. This has been a problem for a while. As with Sam's script, you can manually parse each line and deal with repeating tabs properly. File handling is one of the big motivators on the adoption of Python, and VW highly recommends using py for file handling and data reading. There are many file parsing techniques built in to Python and they are fairly well documented. You can also mix py and native vs if you're not ready to make a total switch for this script. Calling one from the other is fairly easy, though passing data is a little trickier. -Josh
  4. Lighting Device objects contain a render light, and as soon as you add a render light to a drawing, Vectorworks "turns out the work lights," or in other words, does not create the automatic directional light that comes from over your left shoulder. The easiest workaround is to add in a directional render light to your model. I'll sometimes put this in its own layer so it's easy to turn on and off. HTH, Josh
  5. The other workaround is to turn off developer mode when you're testing radio buttons. It's always a bummer when you forget though... I finally hunted down a VW plug-in that triggers this behavior, and this is slated for a fix. Possibly not until 2018, though. -Josh
  6. Pat, you don't necessarily need the SDK to detect new objects, and most of the foibles of dealing with UID's are also present in the SDK. Going back to @Hippocode's comment, you can get better detection of new objects using state events, rather than with IsNewCustomObject(), which only works with objects inserted with their tool. I believe there are a few other posts on how to set up an object to accept states, if you need it. The state you're looking for is kObjectCreated, which equals 13. (The constant name becomes relevant if you're working with the SDK, but for VS you need to define the constant yourself). This should catch all new instances of the object except for when it's inserted via a script. Make sure you test manual insertion, paste, duplicate, and option-drag. They all trigger a slightly different sequence of events. -Josh
  7. This is a long standing issue, and I don't think it will be fixed anytime soon. The control point display in the OIP is affected by the user origin. What's worse, if you manually enter a value, you can't compensate for the offset. The workaround is to not actually display the control point in the OIP, and use two distance parameter fields for display. You use parameter state eventing to keep them in sync: if the user changes the field, move the control point, otherwise calculate the control point position and write to the display field. HTH, Josh
  8. A few things: - We might benefit in hearing why you need to detect the user drag to set the line length. Because with the line-type PIO, VW calculates the length for me, I find I don't care how the object length changes, because I'm dealing with a "fresh" LineLength parameter on each regen. If it's a point or path object simulating a line, that's another story, and in that case there is a control point that prompts a param event change. - Porting from py to the SDK/c++ is not straightforwards, as it's an entirely different API, built around the fact that you pre-compile the plug-in and then register into memory, as opposed to compile at run time. You can run python from within an SDK plug-in, but it's really just running a script, and exchanging data between the environments is a bit tedious. That said, you can create an update event manager that is separate from the plug-in, that functions as a sort of control tower for various events. It's definitely more robust than VS, but I'm not sure it will help you here. - One way the SDK is quite useful is to discover constant values, as those are shared between SDK and vs plug-ins. In the SDK, look at MiniCadHookIntf.h and MiniCadCallBacks.h. The latter, for example, will give you all the possible state events: struct ObjectState : public ObjectEventCall // // Objects with the kObjXPropAcceptStates property have their Object definition procedure called with // the ObjectState::kAction event. The message parameter is a pointer to this ObjectState structure. // Use the fSpecifier to determine the type of data in fData. // { enum { kAction = 44 }; ObjectState() { fAction = ObjectState::kAction; } enum EStateType { kFirstRegenReset, // fData => NULL kMovedReset, // fData => (const ObjectStateData_Position*) kRotatedReset, // fData => (const ObjectStateData_Position*) kParameterChangedReset, // fData => (const ObjectStateData_ParamChanged*) kObjectChangedReset, // fData => (const ObjectStateData_ObjectChanged*) kLayerChangedReset, // fData => (const ObjectStateData_LayerChanged*) kExitFromEditGroup, // fData => (const ObjectStateData_ExitFromEditGroup*) kNameChanged, // fData => (const ObjectStateData_ObjectNameChanged*) kObjectUndoRestore, // fData => NULL kObjectUndoRemove, // fData => NULL kPlanarRefChanged, // fData => (const ObjectStateData_ObjectPlanarRefChanged*) kBeforeExportReset, // fData => NULL kObjectUndoModify, // fData => NULL // Vectorworks 2012 kObjectCreated, // fData => NULL kObjectDeleteBefore, // fData => NULL kObjectUngroupBefore, // fData => NULL // Vectorworks 2014 kObjectExternalReset, // fData => NULL // Vectorworks 2016 kObjectConnectionsRemapped, // fData => NULL // Vectorworks 2017 kObjectReshaped, // fData => NULL kObjectLockStatusChanged, // fData => NULL kObjectPathReversed, // fData => NULL kObjectIsGeneratedBy, // fData => (const ObjectStateData_ObjectIsGeneratedBy*) }; }; All these events should register in py except for the undo related events. One thing you might try is seeing if the reshape event triggers for the end point (if this doesn't, I don't know what will). If I'm counting correctly, that's 18. HTH, Josh
  9. You are correct. FYI, you can find information for all ObjProp constants in the SDK file MiniCadHookIntf.h. Here is the section on context menus. //---------------------------------------------------//---------------------//------------------------------------------------------------------------------------------------- const ObjectPropID kObjXPropHasContextMenu = 21; // YES // Sends ObjectContextMenuEvent::kAction_Init and ObjectContextMenuEvent::kAction_Event // // Boolean // // The parametric can build up context menu and respont to context menu items selection // Parametric has custom context menu // // //---------------------------------------------------//---------------------//------------------------------------------------------------------------------------------------- -Josh
  10. Hi Jeff, GetFileN() will present a dialog for choosing a file and return the path. http://developer.vectorworks.net/index.php/VS:GetFileN You don't have to actually open the file -- use BuildResourceListN() or BuildResourceListN2() to build a resource list from the returned file path. -Josh
  11. If you initialize your variables, you won't get garbage data on the false case (I think). The state that you get will depend on which point you move. One will move the origin of the PIO, as well as affect the rotation and line length. You won't get a line length param change notification, as the user doesn't directly change this parameter, you'll just have to know it's new. If the other control point moves, you should get a line length change as well as a rotation. Also, make sure at the end of your reset block you clear state changes. -Josh
  12. You should see a param state change. If I remember correctly, vsoStateGet can clear the state, so you only get the first state message. Instead, try seeing if vsoStateGetParamChng returns true. -Josh
  13. The gobo is a texture resource. You can edit the texture to adjust the scale as well as substitute in a higher resolution image. This is also the only way to take the projection out of sharp focus: edit the texture image in an image editor. -Josh
  14. This looks like the top/plan view of your lights, though a few units appear to be doubled. Can you share an image from your design layers of what they should look like? -Josh
  15. Can you be more specific about the objects onto which you are trying to map and the problem you are having? Or is the issue with the 3ds export? What you describe should be possible, so we need a little more information on the limitations you are finding. -Josh