Jump to content

Nebeor

Member
  • Content Count

    39
  • Joined

  • Last visited

Everything posted by Nebeor

  1. Hello, Is there a way to open a whole .vwx file through the sdk so that I can automate the testing of Vectorworks files? I'm currently using VW2015 and we want to automate our testing before migrating to a newer version of Vectorworks. If this isn't possible, the best course for me is to put my test cases in symbol definitions that I could automatically extract into a template file. I'm looking forward to your suggestions....
  2. Thank you for you reply, Does this mean that the workaround on http://developer.vectorworks.net/index.php/SDK:Debugging_SDK_Plugins will eventually work? If not, I don't see the point of this tutorial. I just want to be able to use breakpoints and watches, nothing fancy like "Edit and Continue" which i've never used with Vectorworks before. Right now, I managed to make a copy from the "release" config work as "debug", but i am still not able to connect with the debugger.
  3. Hello everybody, I am planning to migrate my plugins to Vectorworks 2021 However, when I try to run on debug, the loading screen of Vectorworks halts on the SDK code somewhere down in the destructor of the TXString. (this happens with my own code, just as with the sample project). I can see this is due to the _ITERATOR_DEBUG_LEVEL, I think it tries to warn me about something, but I don't see how this connects with my code...because I don't see any in my stacktrace. Iterating over the code with a breakpoint didn't helped me either... It crashed after exiting ModuleMain... When I build with Release: most of the things works, but in order to fix the things that are broken, I need the debugger. I am looking forward to your answers!
  4. void SetRotationMat(VWTransformMatrix& matrix, VWPoint3D& normal) { double phi = atan(normal.y / normal.x) * kDegreesPerRadian; double theta = acos(normal.z / 1) * kDegreesPerRadian); matrix.RotateZBefore(phi); matrix.RotateYBefore(theta); } I made this workaround, it works for me!
  5. Here you have the complete error: Error LNK2019 unresolved external symbol "public: void __cdecl VWFC::Math::VWTransformMatrix::SetRotation(class VWFC::Math::VWPoint3D,class VWFC::Math::VWPoint3D)" (?SetRotation@VWTransformMatrix@Math@VWFC@@QEAAXVVWPoint3D@23@0@Z) referenced in function "public: bool __cdecl NotRelevant::NotRelevantMethod(double &,double &,double &,double &,double &,double &,double &,bool &,char * * &,bool)" (?NotRelevantMethod@NotRelevant@@QEAA_NAEAN000000AEA_NAEAPEAPEAD_N@Z)
  6. I tried to use VWTransform's void SetRotation(VWPoint3D newZ, VWPoint3D newY); Unfortunately the compiler complains with LNK2019: unresolved external symbol. I have encountered this bug earlier on, but strange enough, I succeeded yesterday to compile, but I was not able to do the same today. Am I the only one who has issues with this function? I cannot make sense out of this situation.
  7. Thank you Joshua, this makes completely sense!
  8. I don't want my plugin to interfere with the Vectorworks walls because it isn't a door, neither a window. so I tried to tweak with some object variables (varCreateCustomObjectDontInsertInWall), as well the SParametricDef struct that belongs to the plug-in object but without result. How can I block the wall insertion of my plug-in object? I'll thank you beforehand for your reply.
  9. I think the use of matrices is the only sensible way to transform objects.(sorry Vectorscript and Python) The good part now is that I can use almost the same transform for my 2D and 3D parts (hybrid objects), I just have to drop the Z-offfset back to 0 on the transform before applying it to the 2D part.
  10. apparently using scale on VWTransform is the way to go, It will keep everything 2D as long the z offset equals 0.
  11. I made some progress: But i'm not quite there, i changed the object variables like this: TVariableBlock value = TVariableBlock ((Sint16) 3); gSDK->SetObjectVariable(*rect, ovSymbolScaleType,value); TVariableBlock value2 = TVariableBlock ((Real64) -1.0); gSDK->SetObjectVariable(*rect, ovSymbolYScaleFactor,value2); this does almost what I want, but unfortunately this does not work with the rectangle objects that are in my group. I suppose this is a bug? Apparently I need to 'Flip' this object without scale. I'm looking forward to your reply.
  12. Thanks @Nicolas Goutte but, Isn't that just what i'm trying to do? what do you mean with the '-' before hatchIndex?, I'm thinking I have to set a variable somewhere.
  13. VWObject errorBox(gSDK->CreateRectangle(WorldRect(WorldPt(0,0),WorldPt(1000,1000)))); InternalIndex hatchIndex; gSDK->NameToInternalIndexN("ErrorHatch", hatchIndex); //VWPattern hatchPat(hatchIndex); //errorBox.GetObjectAttribs().SetFillPattern(hatchPat); gSDK->SetFillPat(errorBox,hatchIndex); Hello there, I would like to add a hatch pattern that exists in my resource browser to my 2D rectangle (as if I would just drag and drop), but this does not work, what am I doing wrong?
  14. I am sorry, I made a duplicate
  15. VWTransformMatrix vmat; gSDK->GetViewMatrix(gSDK->GetActiveLayer(),vmat); If I execute this piece of code it sends me an union matrix, even when my current view is turned in a weird non-perpendicular angle. I would like to retrieve a matrix which corresponds to the way i'm currently looking to my 3D world. Vectorscript's/Python's VS:GetViewMatrix returns useful information but I don't understand how I could get exactly the same information from the SDK. I find this essential to get the most out of my tools. I'll thank you beforehand for your reply.
  16. I made an extension tool that derives from VWExtensionTool like in the provided SDK samples. How can i add preferences AKA object properties or parametric record to this, so that i can edit those as settings for the tool, like in this little screenshot? I was expecting a solution similar to VWExtensionParametric for VWExtensionTool but i didn't found a way to include the parameter definition array, Thanks beforehand for your advice.
  17. Nebeor

    gSDK->GetViewMatrix

    Thank you, This works, but i would like to understand he story behind TransformMatrix and VWTransformMatrix. What's compatible and what is not?
  18. Nebeor

    gSDK->GetViewMatrix

    I'm trying to transform a 3Dpoint in my drawing to a point in the screen, intuitively I would multiply with a (VW)TransformMatrix that should be easy to retrieve. I tried this: VWTransformMatrix viewMatrix; gSDK->GetViewMatrix(gSDK->GetActiveLayer(),viewMatrix); This line returns a empty (identity) matrix, even when i'm not in top view. I'm using an isometric perspective. What could I be doing wrong?
  19. Nebeor

    Double Clicking on PIO

    This was exactly what i was missing, it is actually the same as it was in VectorScript.
  20. Nebeor

    Double Clicking on PIO

    Hello Stefan, Maybe i wasn't very clear from the beginning. I'm doing exactly as you told me, it's just that it doesn't work. if I double click, i just receive the default dialog that says: choose component : path or profile(because it's a 2D path object), instead of executing the code that i putted in my overridden function.
  21. What should be the purpose of the class of the sub object, should it affect the drawing visually, even when the parent is set to another class? Does this class changing involves plugin objects?
  22. Nebeor

    Double Clicking on PIO

    Which SDK version are you using then? Why does the name of the class starts with 'XXX' and not 'VW'?
  23. Nebeor

    Double Clicking on PIO

    Thank you for your reply, but, i don't have a XXXRegenSink in my SDK, i'm using Vectorworks 2015. I already tried to overload VWParametric_EventSink::OnSpedialEditID() in my subclass but it didn't seem to work.
  24. How do i show my dialog instead the default dialog when double clicking on a plugin object? In VectorScript this is quite simple, but here it isn't. Intuitively i would think i just have to overwrite override a method of the VWParametric_EventSink. Do i have to use another EventSink specific for clicking? (as there is one for panes) Thanks in advance!
  25. My problem was not related to the plugin that's not transparent, but to extrusion inside: I had to use gSDK->setFillpath(h,0) two times: on the 2DpolygonObj that got extruded on the extrusion itsef. Problem solved!

 

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.

×
×
  • Create New...