The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 JSON-TreeToVector TagName
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

echtorigin

Germany
2 Posts

Posted - 08/02/2019 :  09:15:47 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
OriginPro 2019b (64-bit) 9.6.5.169

Operating System:
Windows 10

In the example https://www.originlab.com/doc/OriginC/ref/JSON-TreeToVector#Examples only the values to the primary keys are extracted. Now I would like to access the Address values under the AddressInfo key. Is it possible and what is the correct syntax for the lpcszTagName?

Thanks

YimingChen

1685 Posts

Posted - 08/02/2019 :  2:27:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You may need to iterate over the nodes of the tree. Try the code below:


	foreach(TreeNode tn in tr.value.Children)
	{
		if (tn.AddressInfo._0.Address.IsValid())
			out_str(tn.AddressInfo._0.Address.strVal);
	}


Thanks
James

Edited by - YimingChen on 08/02/2019 2:28:07 PM
Go to Top of Page

echtorigin

Germany
2 Posts

Posted - 08/06/2019 :  09:02:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Excellent!
That works!

Thanks for the fast reply!
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000