Jump to content

Stefan Bender

Distributor
  • Posts

    135
  • Joined

  • Last visited

Posts posted by Stefan Bender

  1. Dear developers,

    in a QTO function (EQTOFunction::ObjectData, VWWSFunctionCall_EventSink::MyFunction(const SDispatchContext& context,  VWVariant& outResult)

    our plug-in returns a VWVariant of type eVWVariantType_Bool (i.e., outResult = VWVariant((bool)(true/false));

    But in the worksheet cell, no boolean value (localized true/false string) is displayed but only the number (1 for true, 0 for false). Imho this is a bug. A number should onmly be displayed if VWVariant is one of the numbers type. If VWVariant is of type bool, the cell should treat it as bool and display it as such. 

    Do I need to submit a bug or is this WAD? If WAD, how else can I make sure that the actual bool value is displayed instead of a number?

  2. Dear developers,

    we are adding some qto functions ('ObjectData') to a few of our PIOs. These plug-ins are meant to be used in different countries so they should be easily localizeable.

    Some of these QTO functions are a little complex and require more than one parameter.

    Some of these parameters must be strings from a given list, like parts of the plug-in or words like "interior" or "exterior".

     

    Let's say a function allows three additional parameters

    ObjectData('keyword',<param1>,<param2>,<param3>)

    and the string in the Opt Desc.vwstrings file would be 

    "ObjectData-keyword"      = "Objektdaten('keyword';<param1>;<param2>;<param3>)";

     

    A sample would be:

    "ObjectData-doorhandletype"      = "Objektdaten('DoorHandleType';<InteriorOrExterior>;<NoOfLeaf>)";

     

    How can we make sure that users may use a localized version of 'DoorHandleType' or 'Interior/Exterior' when calling this?
    And how can we make sure that they see these localized names in the function description?

    And how can we define a list of valid localized options for <param1> and <param2>, in case of the sample the localized versions of "Interior" and "Exterior"?

     

    In theory, it is possible to support localized options, but all potential solutions would require more string files and  a manual synchronization between these string files and the  strings in Opt Desc.vwstrings and Opt Desc DB.vwstrings. It is very likely that localizers will fail to do this correctly and thus the localized versions of the PIO will fail or display an incorrect description.

     

    So my question is if there is a proposed workflow for such a synchronization, maybe some additional strings in OptDesc.vwstrings or something? I think there should be some sort of universal and localized name for function options and also for each parameter. The localized names should be stored in a localizeable string file and be used by VW when displaying the function descriptions. Or does this sort of workflow already exist?

     

    Thanks for any help,

    Stefan Bender
     

  3. Dear developers,


    There are requests to quit a VWDialog during  an ADD_LB_DIRECT_EDIT() event (i.e., when direct editing a list browser cell). The main idea is that if the user selects a custom SResource control (i.e. button button "New" or "Edit..." instead of selecting a resource) in a direct editable resource browser cell of a listbrowser, the dialog should close down and the user enters symbol edit mode.

    We could do this in "normal" dialog events by setting the item to 0, but how is this possible in a direct edit event?

    Or is there another way to force a dialog to quit? I tried CloseDialog(true), but no effect.

     

    Thanks for any help,

    Stefan Bender 

  4. Hi there,

     

    what is the recommended way for a PIO to offer information about the materials of certain components (window frame, glass, shutter...) to the data tag of to worksheet functions? I'm thiunking of a solution that does not require Psets or record fields with names  of materials. Are there any special qto functions or interfaces for that? Is there a PIO that is actually doing this?

     

    Thanks for any help,

     

    Stefan Bender

  5. Dear developers,

     

    does anybody have an idea how I can center an image in a list browser cell? I tried 

     

    VWListBrowserItem vwi = lb->GetItem(ind_line, ind_column);

    vwi.SetItemTextJustification(kItemTextJustificationCenter);

     

    but no effect. I couldn't find any other functions. 

     

    Thanks for any help,

     

    Stefan Bender

     

     

    806627516_listbrowserimagenotcentered.png.82578ea977d2132ebe358ab415db75fa.png

  6. Dear developers,

     

    how can I create a generic solid that has the shape of a sphere?

     

    I tried CreateSphere and then ConvertToGenericSolid, but the conversion failed. Surprisingly, even manually (using menu command  "Modify->Convert->Convert to generic solids") the action failed with an error message saying that this object type can't be converted. So what else can I do? A sphere isn't such an exotic object type so there really should be a way to to that.

     

    Thanks for any ideas,

     

    Stefan Bender

     

  7. Thanks Joshua, I had already thought about something  like that, but I'm not sure if the pointer and the data remain valid if the user switches to another document during the session. So I would prefer something that returns the "current" color table of the active document.

  8. We frequently need to access the document color table. Atm we do 

     

    VCOMPtr<VectorWorks::IDocumentColorTable>    doccol( VectorWorks::IID_DocumentColorTable );

     

    But that seems to be time-consuming so it would be great to get a handle/pointer to the current document's color table without having to create a new VCOM ptr each time.

     

    Is this possible?

     

    Thanks for any ideas,

     

    Stefan Bender

     

     

  9. Dear developers,

    does anybody have an idea how to change the value of an enhanced pull-down menu in a VWDialog? I tried both GS_SelectChoice and VWPullDownMenuCtrl->SelectIndex, but neither worked.

    If I click on the menu, I can see that the correct item is selected (checkmark), but in the "closed" version of the pull-down menu the (redlined) area remains empty. A VIP user has submitted a bug because of this.

    Is there another function that makes the Enhanced pull-down menu draw itself correctly in closed state? Or maybe there is an "update/redraw" function for all controls that does the job?

    Thanks a lot for any help!

    aufschlag.png

  10. Dear developers,

     

    is there a way to hide a line, but still display its line end markers? We have a new wish for the stairs to do exactly that. The only idea I have is to draw a very very short line, but that's not a clean solution. Does anybody have an idea? Thanks!

  11. In theory, it is possible and I think there are working tools doing this, but I wouldn't recommend it unless you're absolutely sure what you're doing. Potential problems are among others infinite recursion and undo.

  12. In GetStatus(), you may wish to return different status values depending on the current tool mode (how many points are required to be drawn?) and maybe on other things (2D/3D mode?). And of course, in HandleComplete you should check the current mode and do the appropriate stuff.

    • Like 1
  13. Dear developers,

     

    in one of our PIOs I will need to disable/dim several pull-down menu entries in an OIP widget. The widget is created automatically (it represents a kFieldPopUp field of the PIO record). I don't want to disable the entire widget, just some of the pull-down menu entries depending on the PIO's setings. Does anybody have an idea? 

     

    Thanks for any help.

     

    Stefan Bender

×
×
  • Create New...