Jump to content


  • Posts

  • Joined

  • Last visited


27 Great

Personal Information

  • Location

Recent Profile Visitors

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

  1. I think you can't use a function as a procedure? Try making it return to a boolean value instead. result := SetWallPres...
  2. Set/GetSavedSetting is by far the easiest option to use, but this is more commonly used for settings that surpass the scope of a drawing/document. If you need to remember these settings based on the active file you can also use a custom hidden record with a field for each setting you require.
  3. Make sure you are compiling with at least 10.15, target should be 10.13. If you still have an issue I find the easiest way to tackle this is to start fresh from a sample project and copy over your custom files and settings. Old projects can contain deprecated settings and after a while it's hard to find what is used and what not. Also make sure you compile generic to cover both ARM64 and Intel.
  4. 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.
  5. It will be part of the VectorMEP 2022 release which should be available during September 2021.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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));
  12. 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.
  13. 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;
  14. 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?
  • Create New...