Hi,
has anybody a nice example of XAttributes?
It is stated that the old XML API is deprecated and a could not find any example of the usage of the new API.
Regards, Stefan.
I have written an simpler sample for XmlInstance usage as attached. FYI
YongAn
Have you looked at the Bentley Class Editor? The first thing you have to do is create/define your "schema" (objects and properties). Then, using the C++ API, insert the schema into the model, create an "instance" of your object/properties, then assign it to the element(s).
Bruce
Stefan,
Do you want to read only or are you going to read and write? Here are the two source files that I refer people to. BusinessDataHandler is the read side of the equation. imodeltoolModifyTool adds data to elements.
HTH,
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
Its the ECXAttributes I would like to use. As Bruce stated the imodelvisitor-sample is very complex, so if anyone has a good example of how to incorporate the Api in c++ code I would appreciate that.
Thanks, Stefan.
Hey Stefan,
Can you clarify what you are looking to do. There are XAttributes and there are ECXAttributes. Prefer the ECXAttributes and look to the XMLInstance api in native code or look at the ECAPI for managed code. There is a sample that demos the native code api (imodelvisitor) and at the last developer conference we demo'd the managed code api.
Regards,
Unknown said:I see that example in SelectSeries 3 (09.209) and it is a .NET example, which is not currently delivered
It's that .NET XmlInstance and its examples that are deprecated.
Regards, Jon Summers LA Solutions
Maybe look at the imodelVisitor example. It;s a little overwhelming, but the seeds of what you need are in there....
Searching back over old SDK's, I see that example in SelectSeries 3 (09.209) and it is a .NET example, which is not currently delivered.
Unknown said:I installed the latest (mssdk081109460en.exe) sdk and the example you mentioned was not delivered
Perhaps that example was provided at the 2012 DevCon in Amsterdam. Somewhere on this site at the files for that DevCon, probably in the BDN section. You may be able to find it there.
Jon,
I installed the latest (mssdk081109460en.exe) sdk and the example you mentioned was not delivered.
Unfortunatley I am not able to install any older sdk (e.g. mssdk081109357en.exe) after that, so I guess I wont be able to find your example.