Jump to content

KN_Michael

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About KN_Michael

  • Rank
    Greenhorn

Personal Information

  • Location
    Austria

Recent Profile Visitors

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

  1. KN_Michael

    Module registration order

    I'm aware of the interfaces and use them. Still having 20 vlbs, I don't want to compile the same code into each and every vlb just for a simple thing like reading a setting file. Sure, it's not much code, but it goes against my coding style to compile the same code into every single vlb... As you are correctly reading, I'm governing which modules get registered for which user on which system and similar... Also, if I want to make a change in one vlb, I compile it, release it and I am finished. If I compile the code into every vlb, I have to recompile new releases for all of them as well and distribute them... If I do not use the VCOM interfaces inside plugin_module_main everything works fine of course and I do use this a lot anyways... I have just problems in this special case.
  2. KN_Michael

    Module registration order

    It does matter in my case. I do register tools, plugins and so on depending on a function from my core module (it reads a setting file). If I rename my core module to XCore.vlb, my Module1.vlb and Module2.vlb are loaded before my core module and calling a function from the core module inside `plugin_module_main` (<= this is the important part, all other code is called only after all modules are registered) will crash because the core module was not registered yet...
  3. KN_Michael

    Module registration order

    Via trial and error I found out that modules seem to be loaded alphabetically. Can I rely on this observation? I have something like following structure: Core.vlb Module1.vlb Module2.vlb And want to use functions of Core.vlb inside the plugin_module_main functions inside my modules. With the naming schema from above this works fine. Is it save to do it this way?
  4. KN_Michael

    Creation of temporary objects while tool is active

    We created a small vs script with only one function in it (http://developer.vectorworks.net/index.php/VS:ReDrawAll) and call this one if we need to redraw the screen. Can be even created "on the fly" from within the code, something like this should work: TXString script; script += "import vs;"; script += "vs.ReDrawAll();"; VectorWorks::Scripting::IVectorScriptEnginePtr vsEngine(VectorWorks::Scripting::IID_VectorScriptEngine); bool outWasCompiledSuccessfully; Sint32 outLineNumberOfSelectedError; TXString outErrorText; if (VCOM_SUCCEEDED(vsEngine->CompileScript(script, false, outWasCompiledSuccessfully, &outLineNumberOfSelectedError, &outErrorText))) { if (VCOM_SUCCEEDED(vsEngine->ExecuteScript(script))) { // SUCCESS... } }
  5. Background I'm trying to calculate connection points between objects by throwing each object I create/edit after creation/change/delete into a custom IVWSingletonUnknown object. In this class I have a simple queue collecting those objects. This queue is processed later on whenever vectorworks reports an idle event (kNotifyAfterPendingUpdate). In the idle event I now process the queue. What happens in the idle event I simply iterate over all objects in the queue, calculate some internal data (like connection point X is connected with object Y's connection point Z) and save this data into the objects (in a custom tag). Afterwards I call gSDK->ResetObject(handle) with every object that has changes - because connections are drawn by each object to be visible to the user. This works fine until I try to undo/redo events Problems I face It seems like that I can't change objects from the idle event without them being pushed into the undo table - I want to avoid this. I see that trying to undo a delete after the idle event regenerated objects is not working anymore - simply nothing is happening in VW although the old handle reappears in code but is not really restored as it does not reappear in VW. Can someone help me with this problem? Can I somehow exclude all actions done in the idle event from the undo system (without clearing the undo table)? I manually take care that objects push theirself into my singleton manager class after restore and before deletion and so on, so I really want that VW ignores any change I make to my objects in the idle event.

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×