Select to view content in your preferred language

How to create a CIM object from a JSON string via ArcPy?

573
2
10-29-2023 07:59 AM
圈圈
by
Occasional Contributor

I use "arcpy. Cim. CIMSymbols. CIMCompositeCallout ()" creates a CIMCompositeCallout object, but it is missing a lot of properties, I want to create a CIMCompositeCallout object with full properties from a relevant JSON string and assign it to a layer. Is there a way?

I know one function is GetJSONForCIMObject, and I just want to know how to implement it in reverse.

Thank you in advance.

0 Kudos
2 Replies
HaydenWelch
Occasional Contributor

Have you used the arcpy.mp CIM access module?  It makes pulling CIM definitions for a layer easy then you modify existing values or build a copy of that definition for a new layer.

0 Kudos
圈圈
by
Occasional Contributor

I agree, but I may not have a layer to copy its definition.

I've solved this problem for now by adding some properties to the definition.

Thanks for your reply.

0 Kudos