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

export ifc model into file #591

Open
ManoChanda opened this Issue Aug 7, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@ManoChanda

ManoChanda commented Aug 7, 2017

I have loaded the ifc file by IfcStepDeserializer then changed it. But unable to write ifc model back to file by IfcStepSerializer. Can anyone guide me how to export ifcModel into file ?

IfcStepSerializer writer = new Ifc2x3tc1StepSerializer(new PluginConfiguration());
Path projectRoot = Paths.get(projectPath);
writer.init( ifcModel , projectInfo, pluginManager, null, null, false);
writer.writeToFile(p.toFile() , null);

@szyuGH

This comment has been minimized.

Show comment
Hide comment
@szyuGH

szyuGH Aug 8, 2017

If anyone found a solution for this issue, I'd like to know too, since I'm stuck with the same problem and need a solution as soon as possible for my thesis.

szyuGH commented Aug 8, 2017

If anyone found a solution for this issue, I'd like to know too, since I'm stuck with the same problem and need a solution as soon as possible for my thesis.

@rubendel

This comment has been minimized.

Show comment
Hide comment
@rubendel
Member

rubendel commented Aug 18, 2017

@ManoChanda

This comment has been minimized.

Show comment
Hide comment
@ManoChanda

ManoChanda Aug 18, 2017

thanks but the problem is to write the modified ifcmodel back into file. Your previous code worked very well for reading and writing but once model is changed, it will not write the updated one but the last read model before modification.

I am unable to figure out the problem why it is not writing the modified model ?

ManoChanda commented Aug 18, 2017

thanks but the problem is to write the modified ifcmodel back into file. Your previous code worked very well for reading and writing but once model is changed, it will not write the updated one but the last read model before modification.

I am unable to figure out the problem why it is not writing the modified model ?

@rubendel

This comment has been minimized.

Show comment
Hide comment
@rubendel

rubendel Aug 18, 2017

Member

Your question was "Can anyone guide me how to export ifcModel into file ?". Please be more specific.

I have also added an example that reads, modifies and then writes the model. It works fine for the change I did (edit the names of all walls), it would help to know what you are trying to change.

https://github.com/opensourceBIM/IfcPlugins/blob/master/IfcPlugins/test/org/bimserver/test/TestReadModifyWrite.java

Member

rubendel commented Aug 18, 2017

Your question was "Can anyone guide me how to export ifcModel into file ?". Please be more specific.

I have also added an example that reads, modifies and then writes the model. It works fine for the change I did (edit the names of all walls), it would help to know what you are trying to change.

https://github.com/opensourceBIM/IfcPlugins/blob/master/IfcPlugins/test/org/bimserver/test/TestReadModifyWrite.java

@ManoChanda

This comment has been minimized.

Show comment
Hide comment
@ManoChanda

ManoChanda Aug 25, 2017

thanks that works fine for string updates, but I suffered as I changed/modified a double value and then use your code of serialization. Infact, it has not worked, because by default it is ifcModel.setUseDoubleStrings(true);

To use your code of serializer, we have to set ifcModel.setUseDoubleStrings(false);

thanks for your help

ManoChanda commented Aug 25, 2017

thanks that works fine for string updates, but I suffered as I changed/modified a double value and then use your code of serialization. Infact, it has not worked, because by default it is ifcModel.setUseDoubleStrings(true);

To use your code of serializer, we have to set ifcModel.setUseDoubleStrings(false);

thanks for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment