Stefan Bender
Distributor-
Posts
135 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Everything posted by Stefan Bender
-
Thanks Joshua, that seems to be a good approach. It also activates all other symbols/PIO within the wall, but maybe I can deselect the ones I don't need afterwards.
-
Dear developers, our window and door tools create PIOs that are inserted into a wall. The user clicks on a position in the drawing and the PIO is created there, if the position is over a wall, the PIO is inserted into that wall (i.e., the wall gets a symbol break and the PIO is the break's "symbol"). So far, so good. But unfortunately it does not seem to be possible to select the inserted PIO visibly. I called SelectObject of course, but no selection handles to be seen (the wall itself is NOT selected). I checked at the very end of my tool's HandleComplete() function that IsSelected() returns true for the PIO, but no selection handles are visible and the OIP remains blank. Is there a special trick to select PIOs in wall breaks? Or is it a bug in ISDK::SelectObject? Thanks for any help, Stefan Bender
-
Find name of referenced file for a symbol definition
Stefan Bender replied to KN_Michael's topic in SDK
You might try calling VWResourceList::BuildList(short objectType, IFileIdentifier* fileID); -
macOS notarization and VW plug-in development
Stefan Bender replied to Hans Martin Kern's topic in SDK
I just got a mail from Vlado who suggested changing some project setting (see attachment). I'm rebuilding the plug-ins and see if it works. -
Thanks, but this function just returns a handle to a group. It doesn't tell you if the group was created by the user or by the PIO.
-
Hi all, how can I find out if an object style has user-provided 2D components or not? Or more precisely, if a given 2D component (top, front, back...) is user-provided or not? I can't seem to find an SDK function for that? Thanks for a short note, Stefan Bender
-
macOS notarization and VW plug-in development
Stefan Bender replied to Hans Martin Kern's topic in SDK
Another related issue: After the upgrade to XCode 11 we keep getting build errors in seemingly random plug-ins that are caused by codesigning. The error message says it's about resource forks or finder info. Some site in the Internet said >>According to Apple: >>Note that browsing files within a bundle with Finder’s Show Package Contents command can cause Finder info to be added to those files. Obviously, we need to do such browsing very often, for instance when we edit .vwstrings or .vs files. So what can be done to make sure that this codesigning stuff doesn't interfere with the builds? Can we try switching codesigning off? Or try removing the resource forks &c automatically before each build? If we try that, we would need to assign write permissions to the files in the bundle which could interfere with Perforce. Thanks for any help, Stefan Bender -
I think it would be a very bad and dangerous idea to use the symbol's bounding box or other symbol data for calculations or anything else but mere display. Overriding (or even worse, changing) data the user entered could create complications. The symbol is just meant for optical purposes.
-
gSDK->ConvertToPolygonN() does not preserve the original
Stefan Bender replied to Richard1's topic in SDK
IIrc we are using the old function (without N) in our code. I think it works fine for polylines, rectangles and arcs. I don't know if we are passing other object types. I'm not sure if it is possible to create polygons with less than 3 vertices. -
gSDK->ConvertToPolygonN() does not preserve the original
Stefan Bender replied to Richard1's topic in SDK
Maybe you can check if h == tempPoly to avoid these crashes. -
Proper arrow for sliding windows and doors
Stefan Bender replied to Christiaan's question in Wishlist - Feature and Content Requests
Maybe there are different local standards how to display the sliding direction. IIrc we also use arrows in the German/Swiss sliding door PIO, but maybe we should do some research and provide all options that are common in targeted countries. -
VCOM Interfaces: Release them or not? (refcount warning)
Stefan Bender replied to Stefan Bender's topic in SDK
Thanks, I'll try that -
IN the constructor of one of our classes, we query for a VCOM interface: Boolean succ = VCOM_SUCCEEDED( ::GS_VWQueryInterface( VectorWorks::EnergyAnalysis::IID_EnergyBuildingElementWinDoorEx, (IVWUnknown**) & m_energy_2021 ) ); As requested in the SDK documentation, we release that interface in the destructor of the class: if (m_energy_2021) { m_energy_2021->Release(); // m_energy_2021 = nullptr; } Before releasing, the refcount (m_energy2021->fPtr) is 1, after releasing it is 0 which looks OK. But after the end of the destructor, it seems that the VCOM destructor is called again, tries to release again and gives a debug warning saying refcount <0. Is this OK? Should I release the interface by myself or wait for the automatic destructor? SDK doc says I should release, but looking at the source code in various SDK plug-ins I get a mixed feeling, in some routines the interface is released, in others it is not. What is the correct workflow? If I am supposed to release the interface by myself, why do I get the debug warning? Thanks for any help, Stefan Bender
-
I never used this function, but maybe the dialog is not yet displayed when you call the function? Does it fail on Mac and Windows or just on one platform? Does the control with the given ID actually exist and is it a static text control? Which RGB values are you passing? How did you initialize the CRGBColor? Check if your color has a valid color ref and check the RGB values.
-
In one of our plug-ins (search and replace) we have to enter and leave symbol edit mode several times while a dialog is running. I.e., one user action enters symbol edit mode, another one should leave it. We are using ISDK->DoMenuName("Group Navigation Chunk",1) to enter symbol edit mode (works) and ISDK->DoMenuName("Group Navigation Chunk",2) to exit, but that does not work. Even after the call, you still see the orange "Exit Symbol" rectangle at the right top corner of the screen. Only after you quit the entire dialog, the orange recangle disappears. Is this a bug in VW, maybe a redraw issue? Or is there another way to exit symbol edit mode and make the orange rectangle disappear? Thanks for any help, Stefan Bender
-
I don't know, but I had hoped that these functions are called so the PIO can handle copy/paste on its own. There are so many Eyedropper options for various graphical attributes that the PIO should need to know which of them are switched on so it can handle the transfer accordingly.
-
How can PIOs know the current settings of the eyedropper tool so they can support the tool? I see two functions // Eyedropper notifies that it is going to put the record 'hObjRecordCopy' as record for the current parametric object // In this event the object can alter the copy to ensure correct data transfer (the data has already been copied to the record) // NOTE! This object's record is still in place when this event is called virtual void OnEyedropperPrepareCopy(MCObjectHandle hObjRecordCopy); // Eyedropper notification that has finished with copying this object virtual void OnEyedropperAfterCopy(MCObjectHandle srcObject); in VWParametricEventSink that allow the PIOs to do something before and after copying, but how can the PIOs know which of the options of the eyedropper tool are set? Imho some data type "EyedropperToolPreferences" should be passed to these functions so the PIOs can react accordingly. Or is there another way for the PIOs to support the eyedropper tool? Thanks for any help, Stefan Bender
-
Thanks a lot for finding this! It is fixed in CL 510756 / SP1.
- 2 replies
-
- vw2020
- stair tool
-
(and 1 more)
Tagged with:
-
Hi Joshua, thanks for your reply. But the problem is to get the localized name (title) if I only have the universal name but no other information such as location of string "resources".
-
Hi all, I'm trying to traverse the current workspace to collect information about the tools and menu items. Unfortunately, I have not yet found a way to do so. I tried using IWorkspaceFile interface, but all attempts failed. I tried VCOMPtr<VectorWorks::Workspaces::IWorkspaceFile> pwf(VectorWorks::Workspaces::IID_WorkspaceFile); TXString workspace_name; gSDK->GetCurrentWorkspaceFile(workspace_name); VCOMError e_open = pwf->Open(workspace_name,fsRdPerm); but e_open returned 1 and successive calls trying to access the menu bar also didn't work (null pointer returned by IWorkspaceFile::GetMenuBar). What mistake did I make? How can I get access to the current workspace? Thanks for any help, Stefan Bender
-
I meant the tool resp. menu title in STooldef and SMenuDef structures.
-
Hi there, how can I find out the localized name of a plug-in (not the one that is currently running) if I only have its universal name? There is an SDK function GetLocalizedPluginName but it is faulty and just returning the universal name. Thanks for any help!
-
I think you should do nothing in HandleComplete() and make GetStatus() return gSDK->OnePointToolStatus() so you can do your stuff the next time HandleComplete() is called.
-
Dear developers, have any of you ever used VWWallObj::InsertNewComponent or ISDK::InsertNewComponentN? I'm currently trying to "copy" the cavities of an existing wall that has 3 cavities (with a total width of 32 cm) to another wall with no cavities but a width of 45 cm. I'm adding 3 cavities/components seemingly sucessfully to the target (after reading them from the "source" wall by VWWallObj::GetComponentInfo), but when I analyze the "target" wall, all three cavities have a width of 0 and the overall width of the target wall is 0. The expected and required result is that the "target wall" has the same components and the same overall width as the source wall afterwards. I assume that the problem may be related to the fact that the target wall had no cavities before this. But I couldn't find an object variable or member function of VWWallObj to tell the wall that its width is defined by components and not by "width". Is there something wrong with my workflow? What can I do to make the target wall "accept" the actual widths of the cavities? Thanks for any help, Stefan Bender
-
Dear developers, what does the second parameter "foldersAreCategories" mean? I tried either value and don't see any difference. What is this parameter used for? I'm asking because in VW 2019 we have serious problems with the resource browser control in dialogs. Symbols in subfolders do not show up, and clicking on names of subfolders causes flickering and garbage to be drawn (I'm about to write a bug report about that, but it would help to know what this parameter is meant for). Thanks for any help, Stefan Bender