Linetypes duplicated in settings

As in topic. V 6.6.18156.11421

Also i have issue with my plugin - options page don’t show in v6 at all i used options page example from here:

@Dale any thoughts ?

Oh and btw. there is bug in toolbars when are set in vertical - buttons are trimmed…

Hello - yeah… the extra linetypes entry should go away with the next update. I’ll see if I can make the buttons do what you show. Thanks for the report.


1 Like

I have issue with adding my custom options page to options in v6 - v5 works without problem but in v6 example code (no matter if winform or wpf) causes super long options dialog opening and it don’t show page at all. (im talking about c# rhinocommon)

@dale Would you mind checking if you also have similar troubles with c# options page on v6?

@D-W do you happen to have any example source that you can share to show what you’re seeing? The duplicated line types dialog that you reference is actually a C# options dialog page.

@Trav you get me wrong probably. First of all double linetypes are no mater if i add page i just noticed this issue so i reported. Period. Second thing is that i want to provide own page for my plug but when i use simplest page - this from here written by @dale as example or for eg. from this source -

Both works in v5 but non of them in v6 - besides when plug has option page implementation opening settings dialog hangs ui (or loads super long - deoends how you look on things) and even after waiting when dialog pops up i don’t see my custom page.

Lets assume i use this one - - in v5 i dont have any issues in v6 it doesn’t show + ui lag.

@D-W the linetypes dialog that you spotted is an ETO/C# dialog that is in progress that is built using the same method as your sample source. I say this to say I am not seeing the same issue that you are. I am wondering if its machine specific or perhaps just something with the SR candidate from that week.

I have two linetypes listed here in (6.6.18156.11421, 05-06-18)

In the first one I am actually able to change the linetype scale, in the second, although the box lets me type or scroll a value, nothing happens and it always goes back to 1.0…


@Trav i checked on other machine on 6.3… there was no double line types but still there no my custom page on list i used exacly this example and i pushed it in:

protected override void OptionsDialogPages(System.Collections.Generic.List<Rhino.UI.OptionsDialogPage> pages)
        var page = new CustomOptionPage("Test Page");

Yes, the duplicated linetypes issue should go away in the final 6.6 it snuck in there and should have only been visible internally while we worked on it.

@Trav Cool. But why i can’t get my custom option page to work?

It seems that this override
protected override void OptionsDialogPages(System.Collections.Generic.List<Rhino.UI.OptionsDialogPage> pages) isn’t even checked for plugins - i tried with simple messagebox popup and in case of v5 i gives message box when options are opened but in case of v6 nothing happens.

Well that’s very interesting when i use in override code like:

RhinoApp.WriteLine(“Override 1st line”);
// var page = new PluginOptionsPage(“Test Page”);
RhinoApp.WriteLine(“Override 3rd line”);
// pages.Add(page);
RhinoApp.WriteLine(“Override 5th line”);
System.Windows.MessageBox.Show(“End of override”);

Everything is ok in v5 and v6 and console shows messages and message box pops but if i only uncomment second line where i create option page notighing happens console doesn’t show even first line …


Try putting your code in a try catch block to see if Rhino 6 is throwing an exception. I’m guessing the messages don’t print because the plug-in manage is throwing some sort of exception.

I have attached the test harness I use when working on custom panels, object properties pages and options pages. I verified the plug-in works as expected in Rhino 6.6. Please give it a try and see if it works for you. (14.9 MB)

@JohnM try catch isn’t executed as earlier if i try to construct page object - if not it works loging to console - your example is working - hmm maybe it is due to compatibility reasons - i work on 5.1 (exacly 5.1.30000.17) rhinocommon cause i want to maintain compability for v5 and v6. Anyway v6 shows on start that compatibility is maintained.

@JohnM would you mind checking options page compiled with rhinocommon from v5 if it also happens in your case?

@pascal @JohnM @dale in (6.6.18163.7531, 12.06.2018) linetypes are set once but i still have no luck with my custom page - could you check this with v5 compatibility?

As below - the same code is running on v5 and v6 - but as you see v6 doesn’t accept page made with 5.1 rhcommon

[AD1] This bug in v6 occurs exacly when i want to construct new page no matter what i’m doing code is running but as soon as i want to create new OptionsDialogPage v6 ignores whole override…

[AD2] I tried to create page earlier in plugin constructor and asign it to global field (v5 works fine still) and in v6 i got now in console:

System.Exception: No PlugIn subclass found.
   w Rhino.PlugIns.PlugIn.CreateFromAssembly(Assembly pluginAssembly, Boolean displayDebugInfo, Boolean useRhinoDotNet) 

[AD3] Now i tried to construct page on New doc event and push it to console but it looks like ?page doesn’t exist? - in v5 page is constructed and prints out itself and own englishName.


Btw. @pascal in newest ver buttons are still trimmed in vertical docked bars

I ran the V5 Rhino Common plug-in wizard in Visual Studio 2015 then added WPF and Windows Forms pages to Options. Tested the plug-in running in Rhino 5 and Rhino 6 and it works in both instances of Rhino. I did notice that the RhinoWindows.Controls.WpfHost does not work properly when running on V6 but the RhinoWindows.WpfElementHost works fine. I will look into the WpfHost issue. (49.8 KB)

@JohnM Thank you but it seems not working here :confused: Look below i don’t see any of those panels here :confused: I didn’t build your solution i’ve just putted your rhp from bin directly…

[AD1] @JohnM i tried your rhp on different machine with v6.3 (19-Mar) theres also no panels so thats bit weird - i get that i could get one machine specific bug but on second issue remains - let’s check what Mitch will say if he will test this.

@Helvetosaur Mitch would you be so kind and try this plug below if you got any new pages in options?

V5CommonPanels.rhp (12 KB)

Sorry, I posted the wrong plug-in, I have too many variations floating around. It turns out what I thought was the V5 plug-in test page in V6 was actually coming from another plug-in. I ran this again in the debugger and am investigating why the pages don’t get added. I have a good idea of what is wrong just need to do a little more poking around.

1 Like

The problem is with Rhino.UI.StackedDialogPage.PageControl, in V5 it is defined:

public abstract Control PageControl { get; }

In V6 it is defined:

public abstract object PageControl { get; }

Causing the following exception which is handled by core Rhino in V6:

Method 'get_PageControl' in type 'V5CommonPanels.V5WinFormsOptionsPageTest' from assembly 'V5CommonPanels, Version=, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Which makes sense because in V5 PageControl returns a System.Windows.Forms.Control and in V6 it returns a object. Unfortunately I can’t think of a way around this right now but I will poke around and see if I can come up with a solution.

I hope there will be some hook here if not i’ll make seperate window for opts cause this is first and only major issue for my plug.

I have it working now, it required some changes to core Rhion 6 but Rhino 6 will now work with plug-ins that were compiled against the V5 or V6 version of Rhino Common. The fix will be available in tomorrows 6.6 build.

1 Like