
Hi
I try to implement your code in another following way .
bool sp_file_save_as(Gtk::Window &parentWindow, gpointer /*object*/, gpointer /*data*/) { if (!SP_ACTIVE_DOCUMENT) return false;
SPDocument *doc=inkscape_active_document();
FILE *fp; fp=fopen("D:\Data1.txt","w"); for ( SPObject *child = doc->getRoot()->firstChild(); child; child = child->getNext() ) { if (SP_IS_ITEM(child)) { Inkscape::XML::Node *newitem = child->getRepr(); Inkscape::XML::Node *path = sp_repr_lookup_name(newitem, "svg:path", -1); //unlimited search depth if ( path != NULL ) { gchar const *svgd = path->attribute("d"); fprintf(fp,"PATH2: %s\n", svgd);
} } }
fclose(fp); return true;
} The Input file name :drawing-1.svg http://old.nabble.com/file/p32072659/drawing-1.svg drawing-1.svg
with above code I can get only One line coordinate instead of the two line.Please check the attached output file The OutPut file name :Data1.txt http://old.nabble.com/file/p32072659/Data1.txt Data1.txt
Now how can i get next line coordinate ?
Thanks
Krzysztof Kosiński wrote:
2011/7/15 mahendra1 <mahendra.gajera@...2640...>:
Hi
I test your code on sp_file_save_as function.But it doesn't work. Please let me know at where i am doing mistake.
At first glance, the "breturn" variable is undefined. Replace it with "true".
If that's not the problem, please be more specific, otherwise I can't help you.
- Does it compile? If not, post the error messages.
- Does it crash when run? If it does, post the gdb backtrace. Run
"gdb inkscape" in a console, type "run", reproduce the crash, then type "bt" and post the output of that. 3. Does it give the expected result? If not, post the contents of D:\data.txt.
Regards, Krzysztof
AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel