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

typesMap property #204

Open
RASRC opened this issue Apr 5, 2023 · 5 comments
Open

typesMap property #204

RASRC opened this issue Apr 5, 2023 · 5 comments

Comments

@RASRC
Copy link

RASRC commented Apr 5, 2023

Hello everyone!

Today I installed the latest version of web-ifc-viewer in one of my apps.

For some reason, the property typesMap stop working and now it gives an error (the result of applying it is undefined).

Cap01

Cap02

It is something related to the upgrade? Is there a way to substitute that expression to obtain a similar result?

Thank you

@RASRC RASRC changed the title typeMap property typesMap property Apr 5, 2023
@Nomeon
Copy link

Nomeon commented Apr 6, 2023

The entire file has been deleted in this commit. Depending on how you want to use all the types, there are probably more efficient ways to get them. Do you care to share your purpose/code?

@RASRC
Copy link
Author

RASRC commented Apr 6, 2023

Sure.

Cap

The idea is obtaining the geometric types of the model (IFCSLABS, IFCCOLUMS, etc.), in the format that typesMap gived, that was an object with the number code of the type as key and the string name as the value.

Thanks!

@beachtom
Copy link

beachtom commented Apr 8, 2023

So this can now be acquired from the web-ifc api using the GetIfcEntityList method. i.e.
viewer.Loader.ifcManager.getIfcAPI().GetIfcEntityList(modelID).

You need to provide your model ID as the list of ifc entities may be different depending on what schema your model is

@RASRC
Copy link
Author

RASRC commented Apr 10, 2023

Hi @beachtom it gives me the following error:

Uncaught TypeError: Cannot read properties of undefined (reading 'ifcManager').

I made some changes to the expresion:

await viewer.IFC.loader.ifcManager.ifcAPI.GetIfcEntityList(model.modelID)

and gave me an array with ids, but they don't have the names of the types associated like typesMap property did.

Cap

@beachtom
Copy link

Sorry should have been viewer.IFC.Loader.ifcManager.getIfcAPI().GetIfcEntityList(modelID).

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

No branches or pull requests

3 participants