Jump to content

Hippocode

Member
  • Posts

    775
  • Joined

  • Last visited

Reputation

27 Great

Personal Information

  • Location
    Belgium-Hasselt

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. https://developer.vectorworks.net/index.php/VS:GetObject Since the symbol definition is unique you can get the handle using its name. Be sure to verify the object type.
  2. It will be part of the VectorMEP 2022 release which should be available during September 2021.
  3. Yes this is only possible using the SDK. You could create a small SDK project that runs a specific python script on startup or any other event if you don't want to bring over the full script.
  4. You could have a script traverse all the rectangles in that layer, and number them in sequence for you. On default that would be stacking order, but you could also use coordinates to define the order instead, like relative position.
  5. Well how I see it this is about two main functions. You need to automate the creation of certain objects (layers, rooms, sheets) You need to update the data of these objects. I'd assume this external info could change during the project development like updating room names. The input for both could be based from Excell or a Worksheet (imported Excell) or any input dialog whatever fits your needs. Both can be done with Vectorscript. A lot can go wrong so It'll be trial and error to develop this. FYI, I'm working on a new plug-in that allows you to export object data (for instance all rooms with their name, custom parameters etc) to Excell. Modify or append this data in Excell and import it back into the drawing, updating all these objects with the new data.
  6. For a simple standard a basic file or template as mentioned earlier is the way to go. If you need it to be more flexible with additional data, or generic from a source like Excell yes a script is a good option. It should be possible iterating all the cells from a Worksheet and do something with it.
  7. Think of the OnCursorAction triggers as a tool, you need to start it before the others will be triggered. And it starts with triggering a controlpoint by clicking/hovering it I guess. The other functions just show the images and text and decide if they should be visible, those are triggered constantly probably. I believe non parametric control points have positive index values, parametric ones negative. you can mix the use of them but it's important to return true/false properly @ IsDefaultCursorHandled Sint32 Index = context->GetCustomPtClientID(); // Index of CP I believe there are a lot of inconsistencies in those interfaces. For me I know that ICursorHandleActionContext::GetObject not always returns the effective object (or didn't in the past). For that reason I keep a copy of the handle in the interface itself and update it whenever GetObject does return a value in any of those functions. This ensures the other functions know which object we are managing the controlpoints for regardless of the provided context.
  8. I'm using the CParametricCustomBar wrapper class instead. This example comes from a cursor event that shows and allows to change the angle between two lines. I initiate it on OnCursorAction_MouseDown on first click fAngleBar.ClearFields(); fAngleBar.AddField("A:"); fAngleBar.SetFieldLock(0, false); fAngleBar.Create(); fAngleBar.SetUp(); fAngleBar.Install(); On any other click, within the same function I close it because what I was doing has completed. fAngleBar.Release(); while mousemove I modify the value to match the situation: gSDK->CustomBarSetFieldAngle(fAngleBar.GetCustomBarID(), 0, Utility::GetAngleBetweenVectors(-V1, VDir));
  9. You can handle creation/deletion/position as mentioned on that page. Depending on how flexible this should be I do this on kobjectCreated event or in the recalc event. But for managing the images, displayed hover text and other specific actions I advice to use the IProviderCursorHandles interface. This also replaces the old code you mentioned. The interface will catch these events.
  10. Hi Julian I have only tested this with the SDK but this is the equivalent function in VS. https://developer.vectorworks.net/index.php/VS:EditObjectSpecial The kObjXPropSpecialEditEditGroup constant should get you into the profile group. I'm calling this from a button widget on the OIP. const TObjSpecialEdit kObjXPropSpecialEditDefault = 0; const TObjSpecialEdit kObjXPropSpecialEditCustom = 1; const TObjSpecialEdit kObjXPropSpecialEditProperties = 2; const TObjSpecialEdit kObjXPropSpecialEditReshape = 3; const TObjSpecialEdit kObjXPropSpecialEditEditGroup = 4; const TObjSpecialEdit kObjXPropSpecialEditSpecial = 5;
  11. It seems that the editing dialog / OIP controls the data and since the record is read only you won't have access. I couldn't find anything in the SDK related to this special hidden record type (besides some kludge calls) . I find it interesting myself as I'd like to have readonly records as well; @Vlado Is this feature exposed to VS / SDK?
  12. The typical way is to hide it from the resource browser. Just like object format records are not visible. If that isn't sufficient you might try working with catching the kNotifyRecordChange event but I doubt you can catch the exact change, you could compare this from a default sitting in your resource library.
  13. For exactly the same reason I did save this data within the plug-in itself. I attached the data to the object handle itself or using parameters. Because the objects are accessible you can determine versions etc..
  14. I believe when creating a symbol from the VWSymbolObj wrapper class it's not properly attached to a container, in your case the active layer. Try additing it manually after you create the symbol, and before you reset it using "gSDK->AddObjectToContainer"
×
×
  • Create New...