Jump to content

Carles Olle

Member
  • Content Count

    45
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Carles Olle

  • Rank
    Greenhorn

Personal Information

  • Location
    United States

Recent Profile Visitors

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

  1. Carles Olle

    Exception Thrown when calling TXResStr()

    My problem was that, after following the steps described here , my linker was still pointing to the debug version of VWSDK.lib. I think that the wiki has been updated with the additional step.
  2. Carles Olle

    Automated creation of Color Shader Textures

    The solution is provided by @JBenghiat here .
  3. I've been trying to port an existing plugin to Vectorworks 2019 SDK and I faced the issues described in this post. We are service select customers but Vectorworks support says that the SDK is supported exclusively through this community forum. There has not been any response to my question in the post above (other than confirm the issue). Is there any Nemetschek representative reading these posts that can confirm that the VWSDK2019 is supported through this forum? Thanks in advance --Carles
  4. Carles Olle

    Automated creation of Color Shader Textures

    Hi, I'm in the situation that I need to create around 1000 objects with a mapped texture each. Now I'm doing it manually and, as you can imagine it takes a long time. I've tried to automate the process by creating a python script but it just happens that python doesn't have the functions to load an image file (png, jpg, etc.), create a texture/material and set up the correct aspect ratio for a right object mapping. My question is: Is there a way to archive the functionality described above using the VW SDK? Thanks in advance. Carles
  5. Carles Olle

    Change the aspect ratio of a color texture image

    I guess not.
  6. Hi, I have an object with an assigned color texture image ( see "How to assign a texture to a 3d object"). I need to change the the associated texture image aspect ratio to adapt to the dimensions of the object. I don't seem to be able to find the function to archive this. Would it be possible to use some sort of vs.GetTexBitPaintNode() / vs.SetTexBitPaintNode() / vs.CreatePaintFromImgN() combination in order to manipulate and reassign the bitmap bits? Those functions seem to be deprecated. Is there new, equivalent functions to archive this? Thanks
  7. Carles Olle

    How to assign a texture to a 3D object (Solved)

    That's exactly right. Thanks (I have another question but I'll open a new topic)
  8. This is a question that probably has a simple answer but that, for some reason I cannot manage to get right. So far I have this code but it does not seem to produce the expected results (the 3D poly-line does not show any texture at all): vs.BeginPoly3D() vs.Add3DPt((-5, 0, -5)) vs.Add3DPt(( 5, 0, -5)) vs.Add3DPt(( 5, 0, 5)) vs.Add3DPt((-5, 0, 5)) vs.Add3DPt((-5, 0, -5)) vs.EndPoly3D() image = vs.LNewObj() textureRef = vs.Name2Index("Test texture") vs.SetObjExpandTexture(image, 0) vs.SetTextureRef(image, textureRef, 1) vs.SetDefaultTexMap(image) vs.SetTexMapBool(image, 3, 3, True) # repeat horizontally vs.SetTexMapBool(image, 3, 4, True) # repeat vertically vs.SetTexMapInt(image, 3, 1, 0) # plane projection vs.SetTexMapReal(image, 3, 1, 0) # offset x vs.SetTexMapReal(image, 3, 2, 0) # offset y vs.SetTexMapReal(image, 3, 3, 10) # scale vs.SetTexMapReal(image, 3, 4, 0) # rotation Why this doesn't work? Any hint will be appreciated. --Carles
  9. Carles Olle

    Dialog control to select textures

    Yes, that works. Thanks. Now I need to find ways to implements "search" and "new texture..."
  10. Hi, I need to allow user to select a texture from one of our dialogs. I've been looking around and I don't seem to find the function to create the control to se select textures. Thanks for the help.
  11. Carles Olle

    Exception Thrown when calling TXResStr()

    I assume that asking for a debug version of VW2019 is out of the question ūüėŹ Anyway, Thanks Nicolas.
  12. Carles Olle

    Exception Thrown when calling TXResStr()

    Thanks for the reply Nicolas, I'm using VW SDK 2019 which I downloaded from https://www.vectorworks.net/support/custom/sdk/sdkdown I decided to use Visual Studio 2017 as it is indicated in http://developer.vectorworks.net/index.php/SDK:Vectorworks_2019_Development but it seems they forgot to mention not to use the toolset that comes with VS2017 (is this the right source for the VW SDK documentation?) If I open DefaultTools.vcxproj from the VW SDK 2019 samples folder I see they are using the 2017 toolset (v141): <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> <PlatformToolset>v141</PlatformToolset> </PropertyGroup> It compiles ok using 2017 toolset (v141) but when running the debug version (release version is ok) I get the Exception described above. When I change to 2012 toolset (v110) I get these errors: 1>------ Build started: Project: DefaultTools, Configuration: Debug x64 ------ 1>StdAfx.cpp 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\GSString.X.h(682): error C2143: syntax error : missing ';' before '{' 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\GSString.X.h(682): error C2275: 'std::hash<_Kty>' : illegal use of this type as an expression 1> with 1> [ 1> _Kty=std::u16string 1> ] 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MCFloat.h(267): error C2065: 'FP_NORMAL' : undeclared identifier 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MCFloat.h(267): error C2065: 'FP_SUBNORMAL' : undeclared identifier 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MCFloat.h(267): error C2065: 'FP_ZERO' : undeclared identifier 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MCFloat.h(268): error C2065: 'FP_NORMAL' : undeclared identifier 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MCFloat.h(268): error C2065: 'FP_SUBNORMAL' : undeclared identifier 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MCFloat.h(268): error C2065: 'FP_ZERO' : undeclared identifier 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MCFloat.h(269): error C2065: 'FP_ZERO' : undeclared identifier 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MCFloat.h(269): error C2065: 'FP_SUBNORMAL' : undeclared identifier 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MiniCadCallBacks.h(2561): error C2065: 'default' : undeclared identifier 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MiniCadCallBacks.h(2561): error C2253: 'TransferImageEffects' : pure specifier or abstract override specifier only allowed on virtual function 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MiniCadCallBacks.h(4001): error C2614: 'SymbolImgInfo' : illegal member initialization: 'SymbolImgInfo' is not a base or member 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\kernel\MiniCadCallBacks.h(4002): error C2614: 'SymbolImgInfo' : illegal member initialization: 'SymbolImgInfo' is not a base or member 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\interfaces\VectorWorks/Extension/IResourceManagerContent.h(29): error C2864: 'VectorWorks::Extension::SSearchProperties::fOnlyCurrentDoc' : only static const integral data members can be initialized within a class 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\interfaces\VectorWorks/Extension/IResourceManagerContent.h(30): error C2864: 'VectorWorks::Extension::SSearchProperties::fSearchOnline' : only static const integral data members can be initialized within a class 1>c:\users\...\appdata\roaming\nemetschek\vectorworks\2019\sdk\sdklib\include\interfaces\VectorWorks/Extension/IResourceManagerContent.h(31): error C2864: 'VectorWorks::Extension::SSearchProperties::fSkipCurrentDoc' : only static const integral data members can be initialized within a class 1>Done building project "DefaultTools.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  13. Carles Olle

    Exception Thrown when calling TXResStr()

    I'm compiling DeafultsTools SDK sample but when running the debug version of the plug-in in VectorWorks 2017 an exception is thrown. Windows SDK Version: 10.0.17134.0 Platform Toolset: Visual Studio 2017 (v141) No compilation error or warnings. The exception is thrown when inside the VWExtensionTool constructor (VWExtensionTool.cpp): fstrTitle = TXResStr( toolDef.fTitle.fResNameWithoutPathOrExtension, toolDef.fTitle.fStringIdentifier, eAllowEmptyResult ); toolDef.fTitle.fResNameWithoutPathOrExtension = "ExtObjThePoint" toolDef.fTitle.fStringIdentifier = "tool_title" eAllowEmptyResult = 1 This is the stack trace DefaultTools.vlb!std::_Container_base12::_Orphan_all() Line 256 C++ DefaultTools.vlb!std::_String_alloc<std::_String_base_types<wchar_t,TXAlloc<wchar_t> > >::_Orphan_all() Line 1803 C++ DefaultTools.vlb!std::basic_string<wchar_t,std::char_traits<wchar_t>,TXAlloc<wchar_t> >::_Tidy_deallocate() Line 3693 C++ DefaultTools.vlb!std::basic_string<wchar_t,std::char_traits<wchar_t>,TXAlloc<wchar_t> >::~basic_string<wchar_t,std::char_traits<wchar_t>,TXAlloc<wchar_t> >() Line 2231 C++ > DefaultTools.vlb!TXString::~TXString() Line 376 C++ [External Code] DefaultTools.vlb!VWFC::PluginSupport::VWExtensionTool::VWExtensionTool(CallBackBlock * cbp, const VWFC::PluginSupport::SToolDef & toolDef) Line 49 C++ DefaultTools.vlb!DefaultTools::CExtObjThePointDefTool::CExtObjThePointDefTool(CallBackBlock * cbp) Line 112 C++ DefaultTools.vlb!VWFC::PluginSupport::REGISTER_Extension<DefaultTools::CExtObjThePointDefTool>(const VWIID & groupID, int action, void * moduleInfo, const VWIID & inInterfaceID, IVWUnknown * & inOutInterface, CallBackBlock * cbp, int & reply) Line 349 C++ DefaultTools.vlb!plugin_module_main(int action, void * moduleInfo, const VWIID & iid, IVWUnknown * & inOutInterface, CallBackBlock * cbp) Line 41 C++ [External Code] Do you know if I need to change something in the sample code? Thanks.
  14. Carles Olle

    General attributes in the document

    Thanks Patrick, this works great! Cheers --Carlos
  15. Carles Olle

    General attributes in the document

    I'm not sure which is the best way to do this so I will ask. I have a relatively complex dialog that requires entering a number of settings. The dialog and its settings are not attached to a specific object but rather allow to create a number of objects. Most of the time parameters are the same but the user has to enter them again every time the dialog opens. Is there a way to attach to the document a set of attributes that ban be used so save and reload the settings for the dialog controls? Thanks --Carlos

 

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.

√ó