-
Notifications
You must be signed in to change notification settings - Fork 36
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
Not able to draw more than 4 Story and spaces, Default selected tool is rectangle and working tool is Polygon #377
Comments
tl;dr the FS file's internal ID counter broke. The file can be repaired, though it's a little time consuming I've had this issue before, in my experience it occurs when the internal IDs become invalid for some reason The two causes that I have found are:
Based on your screenshot, you're looking at the first issue. This can occur if you save and reopen the same file a bunch of times, making changes each time. The root cause seems to be in how the internal IDs for each object are managed. Essentially, each object is given a unique internal ID. There's a counter that increments by 1, each time a new object is created. However when the file is opened (ie saved, closed, reopened) the counter appends 1, rather than adding 1. So 12+1=121, instead of 12+1=13. I think this is caused by some string/int funkiness If this happens often enough you'll get more than 16 digits, everything breaks and you have the bizarre set of behaviours you're seeing now A similar ticket that a colleague of mine raised a while ago, though I'm not sure this was ever actioned. At the time we weren't yet sure why this was happening, but looking back on it, I now believe it to be the internal ID length issue |
This may be solved by setting |
@Mkellyeng I was able to change the floorplan by using your trick but after a file even if my ids are less than 17 digits still I am not able to add the spaces. I have attached a google link where you can find the JSON file. |
I had a go at repairing that file, I'm able to add spaces when testing on the web version (https://nrel.github.io/floorspace.js/), so I expect it'll work in OpenStudio as well I pulled down FS and put in @Mathadon's suggested change, which corrected the ID issue locally. I've pushed it to this repo, however I don't know how often the OpenStudio version of floorspace is updated. So the bug will likely still be present. Essentially, be careful with how often you Edit, then Save, then Close, then Reopen, then Edit your files |
Hello sir. ¿Could u help me to repair my JSON file? It has shown all the described problems above. |
How can I set "largestId = +v;" in OpenStudio? |
Open the floorplan.json file in the model folder in notepad and follow these steps. If you want to repair the file, look at the IDs. They're probably super long, but all start with the same string of numbers. You can find and replace, say, the first 10 digits of the IDs, and the crazy behaviour should go away eg: use the notepad++ find and replace tool to replace "1234567890" with "9". That'll shorten the IDs, and should still all be unique. if you have issues attach the floorplan file and i can look into it. |
Could u show a picture where I can watch where the ID's are inside the json file? |
I cannot draw more than 4 stories and when I create a story after the 4th all these gets selected together and at the same time when I try to draw something using Rectangle tool , it does not work instead it uses polygon tool to draw the shape which does not complete a set meaning if I start the polygon tool and end it at the same point, it should complete my drawing but that does not happen.
OS 3.1.0
Windows 10
The text was updated successfully, but these errors were encountered: