ge25yak Posted June 10 Share Posted June 10 Hi, I'm trying to create spaces from polygons using API and automatically assign some names to them. vertices = [(0, 0), (18000, 0), (18000, 12000), (0, 12000)] vs.Poly(*vertices) hpoly = vs.LNewObj() space_h = vs.Space_CreateSpace(hpoly, 0) If I stop here, everything looks good. An unstyled space was created and I can export it in ifc. But when I continue editing the space, I find that the 2D boundary of the space has disappeared. This makes the exported ifc file has no IfcSpace! vs.Space_AddRoomID(space_h, "test") vs.Space_AddName(space_h, "test123") area = vs.Space_GetNetArea(space_h) vs.AlrtDialog(f"space area: {area}") # the area is always 0 Quote Link to comment
Marionette Maven Marissa Farrell Posted June 10 Marionette Maven Share Posted June 10 It doesn't seem like your other two commands, the AddRoomID and AddName, are working either. I'm wondering if something changed when spaces were updated after those commands were created. Interestingly, I tested in 2018, and I get an error saying that the AddRoomID command doesn't even exist in that version, even though the Dev Wiki claims it was added in 2014. I think something is fishy there. In the meantime, could you use the values from the Space record? Quote Link to comment
MullinRJ Posted June 11 Share Posted June 11 9 hours ago, Marissa Farrell said: Interestingly, I tested in 2018, and I get an error saying that the AddRoomID command doesn't even exist in that version, even though the Dev Wiki claims it was added in 2014. I think something is fishy there. Hi @Marissa Farrell, You are correct, Space_AddRoomID() was not introduced until VW 2019. The documentation is wrong regarding its release date. I try to track these anomalies, but I missed this one. I wonder how many more I missed over the years? Raymond Quote Link to comment
ge25yak Posted June 11 Author Share Posted June 11 (edited) My current workaround is to use vs.IFC_SetProperty to set the name and id in ifc data, since my goal is to see this information in exported ifc... Another thing I noticed is that when I re-checked "show 2d boundary" in oip, the space reappeared. I tested in 2024. Edited June 11 by ge25yak Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.