How can I Insert an asset aligning its position and scaling it to fit while keeping its proportions intact?

663
1
03-18-2019 07:00 AM
AbeleGiandoso
Occasional Contributor

Hi all.

I have a question I have been trying to solve for a while, shown in the images here below. If anyone can give me a tip on how to proceed I would be grateful.

Thanks

A

PS: Ideally it would be great for a similar command to be added to the insert operation (something like "keepProportions,alignPosition") in future releases .

0 Kudos
1 Reply
CherylLau
Esri Regular Contributor
const asset_sx = assetInfo(asset, sx)
const asset_sz = assetInfo(asset, sz)

Lot -->
	InsertAsset(min(scope.sx/asset_sx, scope.sz/asset_sz))
	
InsertAsset(factor) -->
	i(asset, yUp, keepSizeAndPosition)
	s('factor, 'factor, 'factor)
	center(xz)
0 Kudos