ge25yak Posted June 12 Share Posted June 12 I opened a new project in Vectorworks, created a new layer and story in it using the API, and finally found that I could not export the IFC using vs.IFC_ExportNoUI. # create a new layer with story layer_h = vs.CreateLayer("layer2", 1) vs.SetLayerLevelType(layer_h, 'Slab') ok = vs.CreateStory("Story-2", "0") story_h = vs.GetObject("Story-2") vs.SetLayerElevation(layer_h, 2700, 0) ok = vs.AssociateLayerWithStory(layer_h, story_h) vs.SetStoryElevation(story_h, 2700) # export IFC, doesn't work vs.IFC_ExportNoUI("test_path.ifc") I realized that I had to "save the settings" in the IFC export window in the project before I used this function. But the problem is that after saving the settings, if I continue to add new layers/stories to the project, the layer mapping does not occur automatically when exporting the IFC - I have to manually map the layers and update the number of stories. Is there a way to automatically update the layer/story mapping and export IFC without UI? Quote Link to comment
ge25yak Posted June 18 Author Share Posted June 18 Another very weird thing about vs.IFC_ExportWithUI() is that it can't export space objects: # create a new layer with story layer_h = vs.CreateLayer("layer2", 1) vs.SetLayerLevelType(layer_h, 'Slab') ok = vs.CreateStory("Story-2", "0") story_h = vs.GetObject("Story-2") vs.SetLayerElevation(layer_h, 2700, 0) ok = vs.AssociateLayerWithStory(layer_h, story_h) vs.SetStoryElevation(story_h, 2700) vs.ClosePoly() vertices = [(0,0), (0,10000), (10000, 10000), (10000, 0)] vs.Poly(*vertices) poly_h = vs.LNewObj() space_h = vs.Space_CreateSpace(poly_h, 0) # export IFC, no ifcspace found in export vs.IFC_ExportWithUI(True) I think this is a bug! 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.