Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing to model multiple calls #953

Open
motjokk opened this Issue Mar 22, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@motjokk
Copy link

motjokk commented Mar 22, 2019

Experimented a bit with 'set' calls thru JSON API on Bimserver 1.5.125.

Case: Change all room numbers in a revision

  • I had to commit after each 'set' operation for the change to stick.
  • calling multiple 'set' operations, and then committing does not work.
@rubendel

This comment has been minimized.

Copy link
Member

rubendel commented Mar 22, 2019

Can you elaborate? In what field do you store the room number?

@motjokk

This comment has been minimized.

Copy link
Author

motjokk commented Mar 22, 2019

The room number is written to IfcSpace:Name by both revit and archicad

rubendel added a commit that referenced this issue Mar 22, 2019

@rubendel

This comment has been minimized.

Copy link
Member

rubendel commented Mar 22, 2019

Just checked this, cannot replicate. Please see attached "unit test"

@motjokk

This comment has been minimized.

Copy link
Author

motjokk commented Mar 23, 2019

I have tested it again, and it seems I was wrong. It was very informative to see how you write a unit test for it. I will do more extensive testing before submitting a issue in the future.

Posting: "{ \"request\": { \"interface\": \"LowLevelInterface\", \"method\": \"setStringAttribute\", \"parameters\": { \"attributeName\": \"Name\", \"oid\": 1162019005, \"tid\": 4, \"value\": \"newRoomNumber 160\" } }, \"token\": \"d29c253419773f2e5cfbbaec8978eecfd758d78afc7247ee9e6221f87f0646ea35f66a73501cd588c017717c58198ae7\" }"
Response: ( 80 bytes) "{ \"response\": { \"result\": { } } }"
Posting: "{ \"request\": { \"interface\": \"LowLevelInterface\", \"method\": \"setStringAttribute\", \"parameters\": { \"attributeName\": \"Name\", \"oid\": 1161953469, \"tid\": 4, \"value\": \"newRoomNumber 161\" } }, \"token\": \"d29c253419773f2e5cfbbaec8978eecfd758d78afc7247ee9e6221f87f0646ea35f66a73501cd588c017717c58198ae7\" }"
Response: ( 80 bytes) "{ \"response\": { \"result\": { } } }"
Posting: "{ \"request\": { \"interface\": \"LowLevelInterface\", \"method\": \"commitTransaction\", \"parameters\": { \"comment\": \"OneNewRevision \", \"tid\": 4 } }, \"token\": \"d29c253419773f2e5cfbbaec8978eecfd758d78afc7247ee9e6221f87f0646ea35f66a73501cd588c017717c58198ae7\" }"
Response: ( 68 bytes) "{ \"response\": { \"result\": 16187395 } }"
QJsonDocument({"response":{"result":16187395}})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.