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

IfcProxy (2x3): Tag and ProxyType attribute are not written in an ifc file #11

Closed
DominicSinger opened this issue Nov 13, 2015 · 3 comments
Labels
bug Confirmed bug

Comments

@DominicSinger
Copy link

Dear xBIM team,
I am facing the following problem (bug??):

var ifcProxy = model.Instances.New();
ifcProxy.Name = "TestCuboid";
ifcProxy.Tag = new IfcLabel("TestTag");
ifcProxy.ProxyType= IfcObjectType.NotDefined;
...

is written as
#20=IFCPROXY('0UvNqIQW9AvAeKkg$mFvZJ',#11,'TestCuboid',$,$,#82,#69);

but should be written as
#20=IFCPROXY('0UvNqIQW9AvAeKkg$mFvZJ',#11,'TestCuboid',$,$,#82,#69,.NOTDEFINED.,'TestTag');

Thanks and regards,
Dominic

Artoymyp added a commit to Artoymyp/XbimEssentials that referenced this issue Jan 19, 2016
Error in an implementation of Ifc-schema WhereRule xBimTeam#11. One should be able to create a curve-based open profile.
@martin1cerny
Copy link
Member

Not sure what causes this error. I was able to reproduce and it is clearly a bug. I'd recommend using development branch which is pretty stable now and it doesn't have this problem.

using Xbim.Common.Step21;
using Xbim.Ifc;
using Xbim.Ifc2x3.Kernel;

namespace Example
{
    internal class Program
    {
        private static void Main()
        {
            using (var model = IfcStore.Create(IfcSchemaVersion.Ifc2X3, XbimStoreType.InMemoryModel))
            {
                using (var txn = model.BeginTransaction())
                {
                    var ifcProxy = model.Instances.New<IfcProxy>();
                    ifcProxy.Name = "TestCuboid";
                    ifcProxy.Tag = "TestTag";
                    ifcProxy.ProxyType = IfcObjectTypeEnum.NOTDEFINED;

                    txn.Commit();
                }
                model.SaveAs("proxy.ifc");
            }
        }
    }
}
ISO-10303-21;
HEADER;
FILE_DESCRIPTION (('ViewDefinition [CoordinationView]'), '2;1');
FILE_NAME ('', '2016-03-15T15:28:54', (''), (''), 'Xbim File Processor version 3.2.0.0', 'Xbim version 3.2.0.0', '');
FILE_SCHEMA (('IFC2X3'));
ENDSEC;
DATA;
#1=IFCPROXY($,$,'TestCuboid',$,$,$,$,.NOTDEFINED.,'TestTag');
ENDSEC;
END-ISO-10303-21;

@martin1cerny
Copy link
Member

I went back to the "old" master code and IfcProxy implementation is very incomplete. It is missing important infrastructure for serialization/deserialization. I haven't seen anything like that in last 5 years working on xBIM. IfcProxy is apparently not used very frequently.

Both IFC2x3 and IFC4 schema implementation is code-generated in develop branch so we are 100% sure this won't be the case any more and the code base is rock-solid and consistent.

@martin1cerny martin1cerny added the bug Confirmed bug label Mar 15, 2016
@SteveLockley
Copy link
Member

I am closing this as it is resolved in the Develop Branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

3 participants