SamPack Posted March 19 Share Posted March 19 Hello, I'm developing a exporter data object. The plugin uses: - Menu command for open a dialog - Custom Record Formats with popup parameters to add metadata to objects before export. I have two questions: 1. Auto-installing the menu command into the current workspace After copying the plugin to the Plug-ins folder, the user must manually add the menu via Tools > Workspaces > Edit Current Workspace. I'd like the menu to appear automatically. I've tried multiple approaches, all of which either crash or have no effect: • RegisterNotificationProcedure(callback, kNotifyDocChange) during kVCOMRegisterInterfaces in plugin_module_main -- crash (SDK not ready) • VCOMPtr<IWorkspaces>(IID_Workspaces) during kVCOMRegisterInterfaces -- crash (VCOM registry not built) • gSDK->GetCurrentWorkspace()` in the VWExtensionMenu constructor -- constructor is never called at startup • Python script (`wsEditBegin`/`wsEditAddMenu`/`wsEditEnd`) from a notification callback -- crash Question: Is there an official SDK mechanism to programmatically add a menu command to the current workspace at startup? Or is the Partner Install Package the only supported approach? 2. Conditional popup choices based on another field value in the OIP Data pane My Record Formats use popup parameters to let users tag objects with metadata (Brand, Color, Texture, etc.) via the OIP Data pane. I would like the available choices of one popup to change, depending on the value selected in another. For instance: • If Brand = "Ikea" -- Color choices: White, Black, Grey • If Brand = "LA REDOUTE" -- Color choices: White, Black, Red, Yellow, Blue, Green Currently, all popups have static choices defined at record creation time via VWRecordFormatObj::AddParamPopup and PopupSetChoices. Question: Is there a way to dynamically update popup choices based on another field's value? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.