DWF

Reply
Member
catkinson89
Posts: 3
Registered: ‎01-03-2013
Message 1 of 2 (678 Views)

DWF Toolkit Sample Program Issues

678 Views, 1 Replies
01-08-2013 10:55 AM

Hello everyone,

I'm new to the DWF Toolkit, so I was taking a look through the sample projects, and lo and behold, the "Aggregate" sample project was EXACTLY what I was trying to do (I'm trying to automate merging of all DWFs in a subdirectory). I've found that the aggregate sample project works with most DWFs, but whenever I try to merge multiple files with paper spaces and model spaces, it breaks, sending a DWFXMLDuplicateAttributeException.

My question is, is it possible to merge multiple DWFs that have both paper and model spaces? All I need is the paper space. If it's possible, how would I go about doing it? My thanks to everyone who takes the time to respond to this message.

Member
catkinson89
Posts: 3
Registered: ‎01-03-2013
Message 2 of 2 (668 Views)

Re: DWF Toolkit Sample Program Issues

01-08-2013 01:23 PM in reply to: catkinson89

An update: I've found that by deleting the model view from the DWF files, it merges the PAPER view into the output DWF just fine. Now I need to figure out how to either skip handling the model view, or create a temporary copy of the DWF and delete the model view from it before processing the file.

I also tried getting it to skip the first view (model view) in each file, to no avail, and similarly with the second view (just for testing's sake).

I figured I should include a code snippet from the Aggregate program. It errors out after attempting to execute " pSection->readDescriptor(); ".


DWFManifest::smileyfrustrated:ectionIterator* piSections = rManifestIn.getSections();
if (piSections)
{
    DWFSection* pSection = NULL;
    
    for (; piSections->valid(); piSections->next())
    {
        pSection = piSections->get();
        pSection->readDescriptor();    //<-----THIS IS WHERE IT BREAKS

        //
        //  Add the section
        //
        oWriter.addSection( pSection );
    }
DWFCORE_FREE_OBJECT( piSections );
}

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!