Cruisers Forum

Join CruisersForum Today

Thread Tools Rate Thread Display Modes
Old 03-07-2012, 10:22   #1
Registered User

Join Date: Jun 2012
Posts: 2
Plugin Development Question

Is this the right forum for developer/programming questions related to
the source code of opencpn or plugin development?

Is there a way, (from a plugin) to query/get current display chart's path on disk.
(path to the KAP file)?


pelle2004 is offline   Reply With Quote
Old 03-07-2012, 13:13   #2
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Plugin development question?

It is certainly the right forum. Not 100% sure if it answers your question, but check out GetChartDatabaseEntryXML in pluginmanager.cpp

JesperWe is offline   Reply With Quote
Old 03-07-2012, 14:06   #3
Marine Service Provider
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,466
Re: Plugin development question?


Welcome. Always happy to have new developers come aboard. Got your patch in Flyspray. Thanks.

To answer your question: No. No-one has yet seen the need for this API. However, it is a good time to extend the OpenCPN PlugIn API right now, since we will very soon start the 3.1 Beta cycle.

In quilt mode, there are multiple charts open. Which displayed chart do you mean? Do you want a list?

Anyway, if we can understand what you need as far as the identification of one or all charts currently on-screen, we should be able to implement something useful.

bdbcat is offline   Reply With Quote
Old 04-07-2012, 01:00   #4
Registered User

Join Date: Jun 2012
Posts: 2
Re: Plugin Development Question

Hi Everyone!

Thanks for a very nice software!
Good functionality and an excellent way of adding plugins.

The GetChartDatabaseEntryXML is very useful. Then all you only need to know
is what index(s) are currently visible.

Something like

int GetIndexOfVisibleDatabaseEntryXML( int *indexArray, int size, bool flag );
// indexArray: Array of index values of curently visible open charts in quilt mode.
// size: len of indexArray
// flag: Sort by cursor position .....??
// return: Number of entries in indexArray

First entry in 'indexArray' would be the one under the cursor.
If you then add a context menu item from a plugin you can easyly get all the chart info by a right click.

Maybe some flags are need.

PS. Looking forward for the upcoming 3.1 and if I see an opportunity to contribute I will.

pelle2004 is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities

Copyright 2002-2015 Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 05:25.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2016, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.