Skip to content
  • Create a Cadwork material group using c++ API

    Scripting / API
    3
    +0
    0 Votes
    3 Posts
    203 Views
    S
    Here is a snippet working for me // convert string to wstring std::wstring ToWideString(std::string narrowString) { return std::wstring_convert<std::codecvt_utf8<wchar_t>>().from_bytes(narrowString); } void CreateMaterial(CwAPI3D::MaterialController* mc) { // get the string value of the material auto newMaterialNameWS = ToWideString(Value); auto newMaterialNameCS = newMaterialNameWS.c_str(); // check if the material exists auto material_id = mc->getMaterialID(newMaterialNameCS); if (material_id == 0) { // if the material does not exist, create it material_id = mc->createMaterial(newMaterialNameCS);; // set the material group to switchboard materials mc->setGroup(material_id, L"Switchboard_Materials"); } }
  • Willkommen im Cadwork-Community-Forum! 🥳

    Pinned Ankündigung / Announcement
    1
    0 Votes
    1 Posts
    200 Views
    No one has replied
  • Change mouse sensitivity ?

    Moved Modellierung / Modelling
    2
    0 Votes
    2 Posts
    225 Views
    _
    Hallo Sylvain, hier sind noch einige Einstellungen, die Du noch testen kannst um die Grafik-Geschwindigkeit zu verbessern. [image: 1738684243552-05b6843d-912b-4109-8157-92c1ede9fa43-grafik.png] [image: 1738684380621-cc2e67ad-e15f-4add-ab5c-85838603fdbc-grafik.png]