Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel

Unable to find what you are looking for? Click here

 

  • DgnECManager::ObtainInstanceEnabler() returns null

    Stephan L.
    Stephan L.

    Hello again,

    does anyone have a clue, why this method could return null?

    DgnECInstanceEnablerP enabler = DgnECManager::GetManager().ObtainInstanceEnabler(*ecClass, *dgnFileP);

    • checked the ecSchema -> correctly imported, not null
    • checked ecClass -…
    • Answered
    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • Platform : Microstation CE 16 (C#), Component : DgnECManager

    Varsha Reddy
    Varsha Reddy

    The below statement causes the issue "object reference not set to an instance of an object"

      DgnECManager manager = DgnECManager.Manager;

    Is there any specific thing that is required, along with this?

    I went through the examples in the SDK,…

    • 9 months ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT DgnPlatformNet] Element Metrics

    Paul Connelly
    Paul Connelly
    Use interfaces like CurvePathQuery/Edit to get such info directly; or use DgnECManager to query property values.
    • over 6 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT C++] EC SearchClass

    Paul Connelly
    Paul Connelly

    It's used throughout the internal API, and also in the published API (see DgnECManager::GetInstanceCounts()).

    Is there something you're trying to accomplish?

    • over 4 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT .NET] Use IElementPropertyEnabler to obtain DGN Element properties

    Paul Connelly
    Paul Connelly

    IElementPropertyEnabler won't be useful to you. If you want DGN element properties, whether in native or .NET, DgnECManager is usually the place to look.

    • over 3 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT Update 16 C++] Has Element Property X?

    Mangesh.Shelar
    Mangesh.Shelar

    You can try to get all instances available on a specific element. And then check if the individual instance has a specific property:

    //ECQueryProcessFlags flags = intrinsic or extrinsic

    ECInstanceList GetElementProperties(ElementHandleCR element, ECQueryProcessFlags…

    • 6 months ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: DgnECManager.Manager.OnInstanceUpdated

    Jan Šlegr
    Jan Šlegr
    Aced2X said:
    I will use that in the future.

    It should be possible to edit existing post as well.

    Aced2X said:
    I am trying to add 2 new members to the schema.

    It would be possible, even when it's potentially risky operation.

    Aced2X said:
    I want it to…
    • 3 months ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT .NET] ECQuery

    Jon Summers
    Jon Summers

    I'd like to compose a query to use with DgnECManager.FindInstances using an ECQuery.  Unfortunately, the MstnPlatformNet documentation continues to ignore that class.  The SDK examples help little, using the catch-all SelectAllProperties.

    ECQuery query…
    • over 3 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT, C++] Read XAttribut values

    Paul Connelly
    Paul Connelly
    Hi Evan,

    Please use the DgnEC APIs to read EC data in CONNECT Edition.
    See for example DgnECManager, DgnECInstance, ECQuery - all in DgnPlatform namespace.
    If you have specific questions about that API let us know.

    Regards,
    Paul
    • over 6 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT U8] SystemCallback::SetElmDscrToFileFunction() and ItemTypes

    Bruce Reeves SRNS
    Bruce Reeves SRNS

    I still have not been able to successfully attach an ItemType to anything using the ::SetElmDscrToFileFunction(). The same approach when used in a DgnElementSetTool::_OnElementModify() works fine. When inside the ::SetElmDscrToFileFunction() callback,…

    • over 4 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT C++] Adding Item to Element Template

    Bruce Reeves SRNS
    Bruce Reeves SRNS

    Not sure if this is the correct way, but here is a solution I've come up with that adds an Item to an Element Template definition, once you have an ElementTemplateNodePtr :

     

    pTemplate = 		ElementTemplateUtils::FindTemplateNodeByPath (L"MyTestGroup…
    • over 5 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [C# Connect] Retrieving Element Tags

    Paul Connelly
    Paul Connelly
    Hi Maury.

    The C# API does not provide a straightforward way to do this. Even in native code it would not be very straightforward.

    A roundabout way would be to use the DgnECManager API.

    1. Obtain a DgnECInstance for your element
    2. Construct an ECQuery…
    • over 6 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT C++] Programatically add ItemTypes/PropertyDefinitions to an Item Library

    Paul Connelly
    Paul Connelly
    FYI, more generally - you never edit a persistent schema directly.
    You must create a copy of it, apply your modifications, and then use DgnECManager::UpdateSchema() - with the caveat that unless you take care of remapping existing ECInstances to match…
    • over 5 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [MstnPlatformNet] ECQuery documentation missing

    Robert Hook
    Robert Hook

    Hi Jon,

    Can you take a look at:

    FILE: examples\DgnEC\DgnECExample\FindInstancesOnElementForm.cs+37
    FUNC: FindInstancesOnElementForm
    CODE:
    
    /*---------------------------------------------------------------------------------**//**
    * Constructor for…

    • over 3 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT C++] TextField::CreateForModel

    Jon Summers
    Jon Summers

    This works …

    DgnModelP                 model	    { ISessionMgr::GetActiveDgnModelP () };
    FindInstancesScopeOption  option   (DgnECHostType::Model);
    FindInstancesScopePtr     scope     { FindInstancesScope::CreateScope (*model, option) };
    ECQueryPtr…
    • over 3 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT c++] get EC instance of itemtype on element?

    Jon Summers
    Jon Summers
    John Drsek said:
    I need to get the ec instance of an item type instance that is attached to an element

    This article about EC Queries may help.  It distils tips that Paul Connelly and others have given over the years.  You need to create a scope and a quer…

    • over 3 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT .net c#] How to copy ECInstance from cell to all its subelements

    John Drsek
    John Drsek

    Thanks Jan,

    this is all very helpful. i was able to get a new instance added to the sub elements. but its only for the current session of microstation. once i close and reopen the sub elements no longer have the item attached. 

    also im struggling with…

    • 6 months ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [Connect C++] How to read custom properties (no standard properties) on elements

    danny zhu
    danny zhu

    Hi Jon.

    Thanks for the codes. Looks like the code is searching one instance on an element, and the scope is limited in specified schema. 

    I am using similar codes which returns ECInstances for one element,

        DgnECManagerR dgnECManager = DgnECManager…

    • over 4 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT C++] Using a WhereCriterion to filter out schemas

    Yongan.Fu
    Yongan.Fu

    Hi Bruce,

    If you only want to find a specific [ECShema:ECClass] on an element, I think it doesn't need to use WhereCriterion. Below is an example which can get [BaseElementSchema:MstnVolume] on an element.

    void getVolumeByEC(WCharCP unparsed)
    {
    …

    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT C++] StandaloneECInstance and CreateECInstanceHolderElement

    Jon Summers
    Jon Summers

    This code successfully creates a StandaloneECInstance, to which I attach some Item Type properties...

    DgnElementECInstancePtr	AggregateHolder::CreateInstanceAsElement (AggregateCollectionCR aggregates)
    {
        DgnElementECInstancePtr  instance;
        DgnECManagerR…
    • Answered
    • over 4 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT C++] IDgnECTypeAdapter::GetStandardValues

    Jon Summers
    Jon Summers

    Paul Connelly said:
    Create an ECInstance of AreaClass

    I'm stumped.  I think that I need a DgnECInstanceEnabler in order to create an ECInstance.  Here's what I have so far...

    if (TextPropertyManager::GetMstnPropertyFormatterSchema (formatSchema)…
    • over 5 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT C#] Get Item Type Schema

    Jan Šlegr
    Jan Šlegr

    Hi Jon,

    Jon Summers said:
    What am I doing wrong?

    Based on some testing, I think the problem is how you define the scope. This code works fine with your design file:

    FindInstancesScope scope = FindInstancesScope.CreateScope(Session.Instance.GetActiveDgnFile…

    • over 3 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • RE: [CONNECT C#] how to change a dgn file properties (title, comments)

    John Drsek
    John Drsek

    got this from Artur Goldsweer from Bentley Support. He said to get it from the EC data.

    here is some code sample he gave me.

                                using BD = Bentley.DgnPlatformNET;
                                ---------------------------------…

    • over 3 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT C#] Grid created by Grid Manager

    Tilman Reinhardt
    Tilman Reinhardt

    Hi,

    I am trying to access the grid properties (grid lines, coordinates, orientation, etc.) of a OpenBuildings Designer model from a c# addin. I can see from the XML export that the used EC schema should be StructuralModelingComponents.06.00.

    When I ask …

    • 9 months ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • Platform : Microstation CE 16 (C#) - Some properties are not accessible from the element

    Varsha Reddy
    Varsha Reddy

    I see the properties for the cell element like gasket, but unable to retrieve some through the code mentioned below. This code gives me properties of category like "Raw Data", "Extended" etc., but does not gives the category and its properties highlighted…

    • 9 months ago
    • MicroStation Programming
    • MicroStation Programming Forum
>
Communities
  • Home
  • Getting Started
  • Community Central
  • Products
  • Support
  • Secure File Upload
  • Feedback
Support and Services
  • Home
  • Product Support
  • Downloads
  • Subscription Services Portal
Training and Learning
  • Home
  • About Bentley Institute
  • My Learning History
  • Reference Books
Social Media
  •    LinkedIn
  •    Facebook
  •    Twitter
  •    YouTube
  •    RSS Feed
  •    Email

© 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies