![]() |
【转帖】how to judge it has a hyperlink for entity of autocad
how to judge it has a hyperlink for entity of autocad?
how to judge it has a hyperlink for entity of autocad? dear all, now, i want to import hyperlink form dwg to our system, but i don't know how to judege it has a hyperlink for entity of dwg. who can help me? thanks in advance! by the way i know how to export hyperlink in our system to dwg. source code ----------------- oddbentityhyperlinkpeptr hpe = pentity; bool bhashyperlink = hpe->hashyperlink(pentity); hpe->gethyperlinkcout(pentity); -------------------------------- are these functions useful for me? my dd version 2.5.1 last edited by dud@rib.de; 16th october 2008 at 05:26 amfff">. yes, use oddbentityhyperlinkpe::gethyperlinkcollection() etc. vladimir now i know whether the entity of autocad has hyperlink. but i don't konw how to get the url of this hyperlink?who know the method? i have found out the methods! source code -------------------------------------- oddbentityhyperlinkpeptr hpe = pentity; bool bhashyperlink = hpe->hashyperlink(pentity); if (bhashyperlink) { pddbhyperlinkcollectonptr urls = hpe->gethyperlinkcollection(pentity); // i can't understand this function.. we can add more //than one hyperlink to one entity, am i right? int ncount = hpe->gethyperlinkcount(pentity); oddbhyperlink* phyperlink = urls->item(0) //if the ncount > 1, maybe need a loop here. std::string strurl = phyperlink->name(); } ------------------------------------------- am i right? or have some bug? last edited by dud@rib.de; 16th october 2008 at 07:56 pmfff">. it is possible to have several hyperlinks attached to the single entity, though only the first will be available through the acad interface. vladimir thank you for you help! |
所有的时间均为北京时间。 现在的时间是 12:08 AM. |