0% found this document useful (0 votes)
2 views2 pages

Plugins 3

Uploaded by

Kirsvr Venky
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Plugins 3

Uploaded by

Kirsvr Venky
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

...

PLUGIN_ID
OBJECT_ID
pid;
selected_id;
Hello word in C/C++:
PLUGINDECL void CALL get_plugin_info(PluginInfo *info)
{ info->name = L"example change color & unselect";
change color of selected
info->producer = L"Datacomp"; info->www =
L"[Link]"; info->email =
L"contact@[Link]";
element
info->description = L"example of change object color & unselect, for C++Builder XE3";
}

PLUGINDECL void CALL on_plugin_load(PLUGIN_ID pid, bool registered, HWND viewer_hwnd)


{ ::pid = pid; viewer::on_model_load(pid,
model_load);

int button_id = viewer::create_button(pid, 0, button_click);


viewer::set_button_text(pid, button_id, L"Test demo", L"Plugin example");
}

void CALL model_load()


{ selected_id = viewer::get_selected_id(pid);
}

void CALL button_click()


{ viewer::ColorRGB cl;

cl.r = 220;
cl.g = 220;
cl.b = 220;
viewer::set_color(pid, selected_id, cl, false);
viewer::select(pid, selected_id, false);
viewer::invalidate(pid);
}

... using BIMVision; Hello word in C#:


class MyPlugin : Plugin
{

private ApiWrapper api; select all elements


private OBJECT_ID allId;
private int button1;

public override void GetPluginInfo(ref PluginInfo info)


{ [Link] = "My C# Plugin"; [Link]
= "Company"; [Link] =
"[Link]"; [Link] =
"company@[Link]";
[Link] = "C# basics
example";
}

public override void OnLoad(PLUGIN_ID pid, bool registered, IntPtr viewerHwnd)


{ api = new ApiWrapper(pid);
[Link](onModelLoad);

button1 = [Link](0, buttonClick);


[Link](button1, "Select all", "Test");
}

private void onModelLoad()


{ allId = [Link]();
}

private void buttonClick()

You might also like