Notifications
Clear all
[Closed] on click btn inside dotnetcontrol panel
Page 2 / 2
Prev
Sep 22, 2014 8:56 pm
Thank you LoneRobot. I’m closer and closer.
I now get an error:
Unable to convert: #Multi/Sub-Object:Material #737(VRayMtl:VRayMtl_1, VRayMtl:UI67,…) to type: System.Object <<
1 Reply
you can. but you have to use dotnetmxsvalue. search it here and you will find many samples of its using
Sep 22, 2014 8:56 pm
thank you Denis. Before this I had
fn select_by_mat_fn sender args =
(
theMaterials = for m in btnarray where sender.tag == m[1].name collect m[1]
select (for o in Geometry where (findItem theMaterials o.material)>0 collect o)
)
btn.tag = smaterial.name
now I corrected:
fn select_by_mat_fn sender args =
(
select (for o in Geometry where ((dotNetMXSValue o.material)==sender.tag) collect o)
)
btn.tag = dotnetmxsvalue smaterial
last question: should I extract the value from dotNetMXSValue, or I have to compare (dotNetMXSValue o.material) like I did?
Sep 22, 2014 8:56 pm
dotnetmxsvalue is dotnet object. the object has a property “value” which is a max value
if you put an array of materials in tag as dotnetmxsvalue, the tag.value is this array.
Sep 22, 2014 8:56 pm
Denis, I have just found the same:
select (for o in Geometry where (o.material==sender.tag.value) collect o)
thank you so much for your kindness and time
Page 2 / 2
Prev