Git Product home page Git Product logo

Comments (4)

martin1cerny avatar martin1cerny commented on June 26, 2024

It is what it says - invalid assignment. Style should not be assigned to an instance of the building element, but to its geometrical representation items. You need to drill down to element.Representation.Representations.Items to find the items you want to style:
IfcStyledItem

from xbimessentials.

andyward avatar andyward commented on June 26, 2024

Backing up a bit

It's probably worth checking what you're hoping to do here in terms of a use case. This code is amending the styling of a representation of an item in a model. If you save and re-open the IFC file it will should have changed to orange. But it won't change instantly. If you just wanted to highlight the element in real-time this would probably be the wrong approach.

i.e. 2 use cases:

  1. the client wants to permanently change all the walls to be orange in the handover model - satisfied by this approach
  2. Highlight in orange all elements that meet some external criteria - not satisfied by this approach There are better ways but we would need to know your use case & UI tech choices.

from xbimessentials.

wojtpl avatar wojtpl commented on June 26, 2024

The idea is that I have a drawing program, which can generate IFC but I guess no color representation. I want to write c# standalone app to create copy (modyfied) IFC with IFCBuildingElementProxy named i.e. "Beam, Column, Plate" and then assign color to geometry name to make my IFC easier to read. I am static engineer, not professional programmer. But i guess I have to get deeper in IFC structure. If you know any sources where I can improve my skill please send a link and wish me luck :)

from xbimessentials.

martin1cerny avatar martin1cerny commented on June 26, 2024

So, you want to create a kind-off analytical view of the IFC? When you say it can generate IFC, is that your code, already written using the Toolkit?

from xbimessentials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.