Skip to main content

Hi,

I am new to FME, need some help please.

I need to convert AutoCAD dwg with some polylines and text into KMZ. Text includes hyperlink to .dst (dataset) file.

How can I include hyperlink in KMZ file?

Thank you !

Hi @klika68,

Could you share a sample of your DWG?

Thanks,

Danilo


Here is Autocad file. As you can see, any SR*** text has hyperlink to .dst file that is stored on local drive.

index-map-sample.dwg


Here is Autocad file. As you can see, any SR*** text has hyperlink to .dst file that is stored on local drive.

index-map-sample.dwg

Thanks your data. I opened in FME Data Inspector and selected the text from feature type SR31-1708.

 

 

How you can see the attribute extended_data has the information your local files dst.

 

My question: For now do you want to red theses values from extended_data and convert into KML?

 

 

Thanks,

 

Danilo

 

 


Hi Danilo, thanks for your reply.

Yes, I want to covert it to KMZ so both lines and text are included and also hyperlink is preserved in KMZ file so I can open .dst file.

Thank you


Hi Danilo, thanks for your reply.

Yes, I want to covert it to KMZ so both lines and text are included and also hyperlink is preserved in KMZ file so I can open .dst file.

Thank you

Perfect. Could you say that system coordinate is your dwg file? I need to set before write KML.

 

Thanks,

 

Danilo

 

 


Hi Danilo,

AutoCAD drawing has no assigned coordinate system, you can just leave it as is/unkwown.

For Google earth/KMZ file the best bet is to go with either WGS84 or LL84, they are very similar.

Thank you


Hi Danilo,

AutoCAD drawing has no assigned coordinate system, you can just leave it as is/unkwown.

For Google earth/KMZ file the best bet is to go with either WGS84 or LL84, they are very similar.

Thank you

Hi @klika68,

 

I generated the kml final and stored the attributes in dst_local1 and dst_local2:

 

I used the transformer AttributeExposer to enable the format : attribute autocad_extended_data_list

 

 

Workspace attached.

 

 

Thanks, - workspace-dwg-to-kml.fmwt

 

Danilo


Hi Danilo,

unfortunately that`s not what I need. I can see SR*** text with attributes but there is no any links to .dst What I need is an option to click on the SR*** text and .dst hyperlink and open that file.

Thanks


Hi Danilo,

unfortunately that`s not what I need. I can see SR*** text with attributes but there is no any links to .dst What I need is an option to click on the SR*** text and .dst hyperlink and open that file.

Thanks

 

Hi @klika68,

 

I understand you now your request. So, needs to create a attribute like a link.

 

 

In transformer AttributeManager i renamed this:

 

And after used a transformer AttributeCreator to create new Attributes: Hiperlink1 and Hiperlink2:

 

Has a interesting link about a similar case: Open a PDF Document from a kml feature.

 

 

 

Thanks,

 

Danilo

 

Hi @klika68,

 

I understand you now your request. So, needs to create a attribute like a link.

 

 

In transformer AttributeManager i renamed this:

 

And after used a transformer AttributeCreator to create new Attributes: Hiperlink1 and Hiperlink2:

 

Has a interesting link about a similar case: Open a PDF Document from a kml feature.

 

 

 

Thanks,

 

Danilo
Hi @klika68,

 

 

Did you have a good results?

 

 

Thanks,

 

Danilo

 


Hi Danilo,

it does not work for me. I am confused. Why do you have to rename output attribute in Attr. Manager?

Would you be able to send me a workflow?

Thanks


Hi Danilo,

it does not work for me. I am confused. Why do you have to rename output attribute in Attr. Manager?

Would you be able to send me a workflow?

Thanks

Hi @klika68,

 

 

Attached the Workspace Template and the result inside KML file:

 

I

 

 

I configurated the AttributeManager to create the values like Links.

 

 

Thanks, - workspace-dwg-to-kml-04102017.fmw

 

Danilo

 


Hi @klika68,

 

 

Attached the Workspace Template and the result inside KML file:

 

I

 

 

I configurated the AttributeManager to create the values like Links.

 

 

Thanks, - workspace-dwg-to-kml-04102017.fmw

 

Danilo

 

Hey Danilo,

 

is it possible to replace STRING to FILE using StringReplacer or maybe some other option? I am not sure how to do it. The link with STRING does not open in AutocAD but works with FILE instead.

 

 

<th>dst_local_1</th>

 



<td><a
href="string:\\\\van-fps\\groups\\Engineering\\Technical
Records\\Vancouver_Common\\AutoCAD Sheet Set\\Fibre\\SR\\SR14827-3678\\SR14827-3678
7VW07175].dst"> Open</a></td>

 

Thank you very much for your help!

 

capture3.png

 

 

 

 


Hey Danilo,

 

is it possible to replace STRING to FILE using StringReplacer or maybe some other option? I am not sure how to do it. The link with STRING does not open in AutocAD but works with FILE instead.

 

 

<th>dst_local_1</th>

 



<td><a
href="string:\\\\van-fps\\groups\\Engineering\\Technical
Records\\Vancouver_Common\\AutoCAD Sheet Set\\Fibre\\SR\\SR14827-3678\\SR14827-3678
VW07175].dst"> Open</a></td>

 

Thank you very much for your help!

 

capture3.png

 

 

 

 

Hi @klika68, its good to listen that its works!

 


Reply