Skip to main content
Question

AutoCAD to KMZ hyperlink attribute


Forum|alt.badge.img

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 !

14 replies

danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • October 2, 2017

Hi @klika68,

Could you share a sample of your DWG?

Thanks,

Danilo


Forum|alt.badge.img
  • Author
  • October 2, 2017

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


danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • October 2, 2017
klika68 wrote:

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

 

 


Forum|alt.badge.img
  • Author
  • October 2, 2017

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


danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • October 2, 2017
klika68 wrote:

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

 

 


Forum|alt.badge.img
  • Author
  • October 2, 2017

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


danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • October 2, 2017
klika68 wrote:

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


Forum|alt.badge.img
  • Author
  • October 2, 2017

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


danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • October 2, 2017
klika68 wrote:

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

danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • October 3, 2017
danilo_fme wrote:

 

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

 


Forum|alt.badge.img
  • Author
  • October 3, 2017

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


danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • October 4, 2017
klika68 wrote:

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

 


Forum|alt.badge.img
  • Author
  • October 24, 2017
danilo_fme wrote:
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 [VW07175].dst"> Open</a></td>

 

Thank you very much for your help!

 

capture3.png

 

 

 

 


danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • October 24, 2017
klika68 wrote:
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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings