How can I copy FME format attributes - fme

I am using FME Workbench 2018.1.0.1 in Windows 10. I am inputting a kmz file. The only parameter I am reading from it is PLACEMARK because I see no reason to read the others. I need to copy format attributes kml_name and kml_description to NAME and CAPACITY, respectively. I don't see in the AttributeCopier transformer where I can do this. Its Import Wizard does not seem to be made to do this.

You have to expose them first. Double-click on your feature type (Placemark) and go to the Format Attributes tab. There you can select the format attributes you want to expose so you can use them after in downstream transformers.

Related

Any documentation for the XML format of TF.EXE's vc status command?

I am writing a script which will act on modified files in my TFVC (Microsoft Team Foundation Version Control) workspace. I'm invoking tf.exe vc status /format:xml to get the list of changes, but I need to exclude deletes. Is the XML format it returns documented? I know I want to filter on the chg attribute of the PendingChange elements, and I could discover the value by deleting a file and seeing what it returns, but I suspect there may be other values that I should check for as well. It would be much nicer to work off a documented canonical list rather than fixing the script each time it fails on a new value or combination I hadn't seen before. Does the documentation or a schema definition exist? (Neither of the two search engines I use led me to any.)
It seems there is no such documentation available yet. The pending change types using mostly are as below:
I've tested the chg attribute of the PendingChange element in the XML file for the pending change type above, you may reference it:
PendingChange chg="Encoding Branch"
PendingChange chg="Undelete"
PendingChange chg="Rename"
PendingChange chg="Edit"
PendingChange chg="Add Edit Encoding"
PendingChange chg="Edit Rollback"
PendingChange chg="Delete"
PendingChange chg="Edit Encoding"
I found the pending change types come from the enumeration Microsoft.TeamFoundation.VersionControl.Client.ChangeType which is documented in the TFVC client API documentation here: https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2013/bb170193%28v%3dvs.120%29. Although it's not documentation of the XML format, it is the canonical list of the possible values.
As a side note, I ended up not being able to use the XML output for my script since it does not include new files (unless they have been specifically added, which in my scenario they are not) which I needed for my script. (Since I didn't have time to code to the TFVC client library, I parsed the output from tf vc status /format:brief.)

Deedle - what's the schema format for readCsv

I was using Deedle in F# to read a txt file (no header) to data frame, and cannot find any example about how to specify the schema.
let df= Frame.ReadCsv(datafile, separators="\t", hasHeaders=false, schema=schema)
I tried to give a string with names separated by ',', but seems don't work.
let schema = #"name, age, address";
I did some search on the doc, but only find following - don't know where I can find the info. :(
schema - A string that specifies CSV schema. See the documentation
for information about the schema format.
The schema format is the same as in the CSV type provider in F# Data.
The only problem (quite important!) is that the Deedle library had a bug where it completely ignores the schema parameter, so no matter what you provide, it would be ignored.
I just submitted a pull request that fixes the bug and also includes some examples (in the form of unit tests). See the pull request here (and click on "Files changed" to see the samples).
If you do not want to wait for a new release, just get the code from my GitHub fork and build it using build.cmd in the root (run this for the first time to restore packages). The complete build requires local installation of R (because it builds R plugin too), but it should build Deedle.dll and then fail... (After the first run of build.cmd, you can just use Deedle.sln solution).

composite C1 form Renderer localization

I have created a global data type, and use form renderer in a page to let user fill in the data and submit to website.
The default English is working fine.
now when I try to support the second language I run into issues. According to the composite documentation:
1.Add your empty localization file at ~/Frontend/CompositeForms/Renderer/Localization/, for example: Composite.FormsRenderer.de-de.xml
2.Copy the contents of the default Composite.FormsRenderer.en-us.xml to your localization file.
3.Translate the strings.
4.In ~/App_Data/Composite/Composite.config, under the section locate Composite.Plugins.FormsRenderer's add section and register your localization file
but ~/Frontend/CompositeForms/Renderer/Localization does not exist, and neither does Composite.FormsRendereren-us.xml exists.
is the documentation outdated? does anyone had experience with localizing form renderer on user defined data type?
thanks
The documentation IS outdated at the moment (and will be updated soon - thanks for pointing it out).
Do it in the following way on 4.0 or later:
Make a copy of ~/Composite/InstalledPackages/localization/Composite.Forms.Renderer.en-us.xml, changing the language/culture code from 'en-us' to your language's (e.g. Composite.Forms.Renderer.de-de.xml).
Translate the strings.
No need to change anything in ~/App_Data/Composite/Composite.config any more.

How can I find out what Change template a DOORS Module is using?

I need to use DXL to loop through all modules in our database and find out which Rational Change Template each module is using, and possibly switch it to a different one. Can't find any documentation on Change API for DOORS.
I had to contact IBM directly to get this information. But here it is if anyone else needs to do it.
Skip cfgData = createString
string current_template = ""
getModuleConfigurationData(m, cfgData)
find(cfgData, CSINT_CONFIG_USE_TEMPLATE, current_template)
delete cfgData
At this point current_template has the file name of the template that it is configured for. This can be used to compare to existing templates and verify it is set correctly.
Also, if an update is necessary the following function will save the skip list back to the configuration.
put(cfgData, CSINT_CONFIG_USE_TEMPLATE, new_template)
cmSaveModuleConfigurationData(m, cfgData)

Filemaker: exporting a PLIST (for iOS)

I have a database which I want to export as an iOS compatible PLIST.
The work around I have come up with is to create a calculated field which adds the tagged padding and header and creates a report using these fields. I then export the preview of the report as a PDF, open the PDF in Acrobat Reader, select all text, copy and paste into XCode which recognises the PLIST format and all works as expected.
Is there a better way of doing this? (This seems a really convoluted way of doing things, high chance of error, etc.) The Export as XML option looks promising but I can't seem to join the dots.
Two ways that I can think of to do what you're trying to do. The most elegant way is probably the XML with XSLT export which you suggest. If you don't already know XSLT, though, you might try the following -- it sounds like with the calculated XML line you've already created, like this would be a simple change to your database:
Create a single new global field, say outputXML
Create a script, say plistCreator
In the plistCreator script:
Set outputXML to ""
Go to the first record you want to export
Loop through every record putting your calculated XML line into outputXML (set field outputXML to outputXML & ΒΆ & calculatedXMLLine)
Go to next record, exit after last
Export Field Contents (note that this is a different command than Export) for outputXML
The cleanest solution is to use the export XML with an XSLT for transforming the output. You'll need to know a little XSLT to do this, or at least be able to customize the examples from FileMaker.

Resources