Community
DWF
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programmatically read markups of DWFx

8 REPLIES 8
Reply
Message 1 of 9
jamilnour
1796 Views, 8 Replies

Programmatically read markups of DWFx

Hi,

How can I programmatically read the markups of a DWF(x) page?

Any sample...

Thank you
Jamil
8 REPLIES 8
Message 2 of 9
ADR_Jerry
in reply to: jamilnour

Thank you for your question.
DWFToolkit currently has no API to read markups.
But you can use APIs of Autodesk Design Review (ADR) to implement this function.
The following is the sample code:

ECompositeViewer.IAdECompositeViewer2 CompositeViewer = (ECompositeViewer.IAdECompositeViewer2)axCExpressViewerControl1.ECompositeViewer;

ECompositeViewer.IAdSection Section = (ECompositeViewer.IAdSection)CompositeViewer.Section;
ECompositeViewer.IAdContent3 SectionContent = (ECompositeViewer.IAdContent3)Section.Content;

AdCommon.IAdCollection Markups = (AdCommon.IAdCollection)SectionContent.get_Objects(2); //2 is to return all markup objects
foreach (ECompositeViewer.IAdMarkup Markup in Markups)

{

AdCommon.IAdCollection MarkupProperties = (AdCommon.IAdCollection)Markup.Properties;

foreach (AdCommon.IAdProperty MarkupProperty in MarkupProperties)

{

//Access each property of a markup...

}

}

------------------------------------------

// ObjectType - Used in conjunctions with the Objects property above

[

export,

library_block

]

enum ObjectType

{

AllPublishedObjects = 0,

SelectedPublishedObjects = 1,

AllMarkupObjects = 2,

SelectedMarkupObjects = 3

};

------------------------------------------

You can download ADR from here.
ADR supplies powerful APIs to process DWF files. Please refer to Autodesk Design Review 2010 API Reference for detailed description of all of the supported APIs and commands in Design Review 2010.
Please let me know if you have any further questions.

Message 3 of 9
jamilnour
in reply to: jamilnour

It is clear now...we will probably need more help when we write the code.

I have question please:

Is it possible to build a webservice project using visual studio and ADR API to expose these functionalities?

Thank you
Jamil Edited by: jamilnour on Nov 20, 2009 8:55 AM
Message 4 of 9
ADR_Jerry
in reply to: jamilnour

It's possible to realize the function you want using the technology you suggest.
Autodesk has a similar product named freewheel which you can find via the following link.

Please let me know if you have any further questions.

Message 5 of 9
edawgbrown
in reply to: jamilnour

Hi Jerry,

Been looking at this thread. You mention its possible to read Markups from a dwf. Is it possible to create Markups using the API? If so please give me a sample.

Thanks,

ED
Message 6 of 9
ADR_Jerry
in reply to: jamilnour

Thank you for your question.

However, there is no API supplied to create Markups currently.

Please let me know if you have any further questions.

Jerry
Message 7 of 9
dbischof216
in reply to: jamilnour

Hello I am using the latest API (2012) and trying to get the markups via javascript.  I am trying to find the right objects but the API document is not clear.  Can you please give me the same example with javascript?  Thank you!

Message 8 of 9
herbert.he
in reply to: dbischof216

Thank you for your question.

 

Here is the javascript smaple code:

 

ECompViewer = ADViewer.ECompositeViewer;

var AllObjects = ECompViewer.Section.Content.Objects(2); //2 is to return all markups, 3 to return only selected markups

for (iObjects=1;(iObjects<=AllObjects.Count);iObjects++)

  var Props = AllObjects(iObjects).Properties;

  for(iProps=1;(iProps<=Props.Count);iProps++) 

  {

    var Prop = Props(iProps);   

    // ...

  }

}

 

Any further question please let me know.



Herbert He
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Message 9 of 9
jmatg123
in reply to: jamilnour

I noticed the reply that there was no way to programmatically add markups through the Design Review API. But the reply was in 2010. Is there anything now that would allow this? Any sample code?

 

We are trying to insert rectangular callouts in a dwf for the user through the API. And we would like to fill in the text for them as well. Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services