Well, this code is magic! Here is the resulting code that seems to work. Any optimizations would be appreciated.
code:
If IsNewCustomObject(ObjectName) THEN
BEGIN
If IsVPGroupContainedObject(objectHand, 2) = TRUE THEN
BEGIN
layerScale:=GetObjectVariableReal(objectHand, 1003);
END
ELSE BEGIN
layerScale:=getLScale(ActLayer);
END
END
ELSE
If IsVPGroupContainedObject(objectHand, 2) = TRUE THEN
BEGIN
layerScale:=GetObjectVariableReal(GetVPGroupParent(GetParent(objectHand)), 1003);
END
ELSE BEGIN
layerScale:=getLScale(getLayer(ObjectHand));
END;[/code]
Thanks.