Jump to content

No IfcSpace in exported IFC after vs.Space_AddName


Recommended Posts

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

 

Link to comment
  • Marionette Maven

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?

Link to comment
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

 

Link to comment
Posted (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 by ge25yak
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...