# Manual objects compare with x++

**URL:** <https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747>\
**Category:** Developer Forum\
**Created:** [September 8, 2011, 7:51am UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747 "2011-09-08T07:51:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raimondas](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Raimondas](https://www.dynamicsuser.net/u/Raimondas)\
**Post date:** [September 8, 2011, 7:51am UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747/1 "2011-09-08T07:51:14Z")

</div>

Hey, ive got into a problem, i need to have myself a method to compare a passed object to it (class, table, form…) with the sys layer of it, whats the way to do it ? (Not with the compare tool, i mean manual way, with x++). I tryed using SysCompare, Tutotorial\_CompareContextProvider and so on, but didnt succed in any, maybe someone have some code snippet or example for it ? braings melting three days long allready \>.\<;

---

<div class="post-metadata">

**Author:** ![Raimondas](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Raimondas](https://www.dynamicsuser.net/u/Raimondas)\
**Post date:** [September 8, 2011, 8:26am UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747/2 "2011-09-08T08:26:45Z")

</div>

Yet too, ax is 2009.

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [September 8, 2011, 9:50am UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747/3 "2011-09-08T09:50:05Z")

</div>

I think SysCompare::silentCompare() and SysTreeNode::findNodeInLayer() is everything what you need.

---

<div class="post-metadata">

**Author:** ![Raimondas](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Raimondas](https://www.dynamicsuser.net/u/Raimondas)\
**Post date:** [September 8, 2011, 10:11am UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747/4 "2011-09-08T10:11:41Z")

</div>

Ive allready found out how to use these, nope, its not enough, i need information like how many lines of code have been changed in class between sys and for example var or usr layers, with these i only get boolean info, is there a difference or not… ive created my own class which extends SysCompare and overridden all the methods to public from protected, maybe there is a way to get some info in a container or anything about the changes itself between the object layers ? tryed nodeCompare, compareComparable methods, but they all return only is there a difference or not, not the difference itself. I need this info on creating alternatiev to upgrade estimation report tool.

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [September 8, 2011, 10:45am UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747/5 "2011-09-08T10:45:29Z")

</div>

Why didn’t you tell it at once?

I would iterate subnodes recursively, use SysCompateText for actual comparison and process its result by myself. The result is a container of code blocks - you’ll understand it when you try it.

---

<div class="post-metadata">

**Author:** ![Raimondas](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Raimondas](https://www.dynamicsuser.net/u/Raimondas)\
**Post date:** [September 8, 2011, 11:12am UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747/6 "2011-09-08T11:12:58Z")

</div>

Ok, i get an iterator over subnodes, i assign them to type TreeNode ar SysTreeNode variables, but SysCompareText requires strings for comparison… how is it possible, if i have for example a class method in a node variable, to have its code text ? .toString() gives me path or name of the method, not the code itself.

kinda not feeling comfortable with ax yet, only first three days of working with it…

---

<div class="post-metadata">

**Author:** ![Raimondas](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Raimondas](https://www.dynamicsuser.net/u/Raimondas)\
**Post date:** [September 8, 2011, 11:19am UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747/7 "2011-09-08T11:19:53Z")

</div>

dah, solved it, thanks for a guide line, ill ask more questions if i get into any probs.

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [September 8, 2011, 11:22am UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747/8 "2011-09-08T11:22:30Z")

</div>

SysTreeNode has hasSource() and AOTgetSource() method.

You’re not in a very simple area of AX, but I have already working implementation of these things (the normal AX compare). Cross-references and code traversing in debugger should be your best friends in this phase. 🙂

---

<div class="post-metadata">

**Author:** ![vkesavaramasarma](https://avatars.discourse-cdn.com/v4/letter/v/47e85d/32.png) [@vkesavaramasarma](https://www.dynamicsuser.net/u/vkesavaramasarma)\
**Post date:** [December 30, 2012, 3:29pm UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747/9 "2012-12-30T15:29:53Z")

</div>

Hi,

I have a similar requirement to understand the way we can compare AX objects Manually instaed of using Code Compare tool. Could you please help me how could you acheive this?

Thanks.

---

<div class="post-metadata">

**Author:** ![FrancescoParis8](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@FrancescoParis8](https://www.dynamicsuser.net/u/FrancescoParis8)\
**Post date:** [April 12, 2016, 10:33am UTC](https://www.dynamicsuser.net/t/manual-objects-compare-with-x/32747/10 "2016-04-12T10:33:32Z")

</div>

how solved it?
