Skip to main content
Known Participant
May 5, 2023
Question

Undefined symbol: ai::ArtboardList::ArtboardList()

  • May 5, 2023
  • 4 replies
  • 1652 views

hi all,

i want to retrieve artboard details adobe sdk .. created plugin in xcode

 

the following code i used to retrieve the details.

ASInt32 artboardIndex = 0;

    ai::ArtboardList artboardList;

    

    result = sAIArtboardSuite->GetArtboardList(artboardList);

 

    result = sAIArtboardSuite->GetActive(artboardList,artboardIndex);

 

    ai::ArtboardProperties artboardProperties;

    result = sAIArtboardSuite->GetArtboardProperties(artboardList, artboardIndex, artboardProperties);

    AIRealRect artboardRect;

    result = artboardProperties.GetPosition(artboardRect);

 

but im getting an error saying that 

 

 

Undefined symbol: ai::ArtboardList::ArtboardList()

 please anyone help me to resolve this

 

Thank you

This topic has been closed for replies.

4 replies

Legend
May 6, 2023

Following either (Xcode or VStudio) project for SnippetRunner, you'll find an entry to compile IAIArtboards.cpp which has the code for both ArtboardList and ArtboardProperties .

A. Patterson
Inspiring
May 9, 2023

This is what I was about to post. You need to include the relevant CPP. If you ever get an `Undefined symbol` that means you are missing code, which is either a library or a .cpp file.

Rick E Johnson
Inspiring
May 5, 2023

I did a search for "ArtboardList" in the SDK headers and found it is defined in "IAIArtboards.hpp" so you might try including that file.

Mahesh12Author
Known Participant
May 6, 2023

hi @Rick E Johnson  i have included  "IAIArtboards.hpp" this file.. but still showing Undefined symbol: ai::ArtboardList::ArtboardList() 
build failed

Rick E Johnson
Inspiring
May 6, 2023

Bummer. Sorry that didn't work. I'm sure there are a lot of people on this forum who have done this and can help.

Another option is to use CORE from Hot Door (http://hotdoorcore.com), as I do. It's free, and a lot easier to use than the SDK, although you can add SDK suites for anything not included in CORE. It's essentially c++ wrappers that simplify access to several versions of the SDK and adds things like cross-platform UI similar to Adobe's ADM which was sadly discontinued with AI16.

 

I'd download CORE and open the Panel sample. Add #include "hdicoreArtboard.h" at the top of panelPlugin.cpp.

 

Look for the callback "__artboardChangedCB()" which contains this:

 

const uint32_t count = currDoc->artboardCount();

 

Now add a for loop and examine the artboards.

 

for (uint32_t i = 0 ; i < count ; i++){

std::unique_ptr<Artboard> thisArtboard = currDoc->artboardAtIndex(i);

// check whatever properties you want in the console window bottom-right in Xcode,

// then change the code to something meaningful

std::cout<<"Do something with the properties of thisArtboard"<<std::endl;

}

Rick E Johnson
Inspiring
May 5, 2023

Sometimes you don't need to use a suite's functions, but need one or more of the definitions in it, in which case you can include it but not necessariy acquire it.

Inspiring
May 5, 2023

Did you load the suite using AcquireSuite?

Mahesh12Author
Known Participant
May 5, 2023

Yes @superpanic  i have acquired suites