Skip to main content

App linking

Any app that can open a link can hand a pole to D-Calc, and get the results back when the inspector is done. It's designed for Esri ArcGIS Survey123 and Field Maps, but works the same from any app or web page. It runs on the device, so it works offline.

This section is for whoever sets up the integration: usually a GIS administrator.

How it works​

  1. Your app opens a launch link such as dcalc://createPole?poleId=…&diameter=…&returnUrl=…, built from the feature's attributes.
  2. D-Calc opens the pole, filled in from the link. The inspector adds or checks the damage.
  3. The inspector taps Send to Calling Application.
  4. D-Calc fills the results into the returnUrl you supplied, and opens it. That takes the inspector back to your app, with the results.

If the inspector isn't signed in, D-Calc keeps the link and opens the pole once they are.

dcalc://createPole?<parameters>
dcalc://viewPole?<parameters>
RouteWhat it does
createPoleOpens a pole built from the parameters. If a pole with the same poleId is already on the device, it opens that one instead of making a copy.
viewPoleOpens the pole with this poleId. poleId is required: without it, the link is ignored. If the device doesn't have the pole (poles aren't synced between devices), it's created from the link.

Both routes take every input parameter. Route names aren't case-sensitive.

URL schemes​

AppScheme
D-Calc (App Store)dcalc
D-Calc QA (TestFlight)dcalc-qa
D-Calc Devdcalc-dev

Use dcalc for production. The QA and Dev schemes are for testing with those builds, which can be installed alongside the App Store app.

Moving from D-Calc 5​

D-Calc 5 links started with https://dcalc.edmlink.com/. Replace that with dcalc:// and the rest of the link works as it is: the parameter names are the same, projectName is accepted and ignored, and the result parameters are written the same way.

A link an inspector shares from D-Calc (https://link.d-calc.app/open#…) is D-Calc's own format, for opening a pole in another copy of D-Calc. It packs the whole pole into one encoded value, and it isn't part of this contract: don't build or read share links from your app. To hand a pole to D-Calc, use a launch link.

Encoding​

Each parameter value must be URL-encoded (percent-encoded). This matters most for returnUrl, which is itself a link with its own ?, & and =. Encode the whole return URL as one value, so its &s don't end it early:

dcalc://createPole?poleId=A-1042&diameter=12.5&returnUrl=https%3A%2F%2Fexample.com%2Fdone%3Fid%3D%24%7BpoleId%7D%26net%3D%24%7Brsm1_net_act%7D

Here the return URL is https://example.com/done?id=${poleId}&net=${rsm1_net_act}. In Arcade, UrlEncode() does this.

D-Calc is lenient, so a link from an older or slightly different integration still opens:

  • Names: the exact spelling is tried first, then any capitalization (returnURL works).
  • Empty values (poleName=) count as absent.
  • Duplicates: if a parameter appears twice, the first one wins.
  • Numbers: always a dot for the decimal point, whatever the device's region.
  • A bad value (such as diameter=abc) drops only that field. The pole still opens, and the inspector can fill it in.
  • Unknown parameters are ignored.

Units are always imperial, whatever the inspector's unit setting: lengths in inches; pole length and embedment in feet; fiber strength in PSI; angles in degrees clockwise from the line.

When the pole is already on the device​

When a link's poleId matches a pole already on the device, D-Calc updates that pole rather than adding another:

What the link carriesWhat happens
poleName, description, returnUrlReplace the pole's values
A complete, valid Species, Class and LengthReplace the pole's ANSI details
Measurements, damages, fiber strength, taper, embedmentApplied only if the pole has no damage entered yet

Once the inspector has entered damage, their measurements stay as they are, and D-Calc says so: "Link Measurements Not Applied." That way, opening the same pole from your app again never overwrites the inspector's work.

In this section​