Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all 7260 articles
Browse latest View live

[V8i] VBA interface error: failed creating the application object - 0x80040562

$
0
0

I just had this error come up today. I have no access (through Microstation/Power InRoads) to any of my VBA macros, nor the VBA editor.

I suspect that IT did some kind of Windows update...This isn't a new installation, so I doubt that I need to install any prerequisites (everything has been working just fine)

Has anyone else run into this issue recently, so that I might give IT a clue where to look?

Thank you.

MaryB
PowerInRoads 08.11.07.615


How to make my application a trusted application for Microstation CE 10.7?

$
0
0

Hi All,

    I make a simple MDL appication runing on top of Micration CE 10.7, my mdl application can load when user open a general .dgn file,

but there are some cases where the .dgn file is digital signed or proted, my appliacation can't be loaded as it is said my application is un-trusted customized application.

so my quesiton is that,  how i can make my applicaiton a trusted appliation?  and is there any way to remove the protect from the .dgn file.(note: the .dgn file is from other people, i have

no ideal how they sign or protect the file.)

thanks,

Rick

How to make my application a trusted application for Microstation CE 10.7?

$
0
0

Hi All,

    I make a simple MDL appication runing on top of Micration CE 10.7, my mdl application can load when user open a general .dgn file,

but there are some cases where the .dgn file is digital signed or proted, my appliacation can't be loaded as it is said my application is un-trusted customized application.

so my quesiton is that,  how i can make my applicaiton a trusted appliation?  and is there any way to remove the protect from the .dgn file.(note: the .dgn file is from other people, i have

no ideal how they sign or protect the file.)

thanks,

Rick

[CONNECT .NET] CurveVector and DgnCurveVector

$
0
0

The .NET API provides classes CurveVector CurveVector and DgnCurveVector. CurveVector is analogous to the C++ equivalent, but DgnCurveVector is unique to the BentleyGeometryNetBentleyGeometryNet API.

DgnCurveVector inherits from CurveVector and some other interfaces.  What is its purpose?  Why doesn't C++ have a DgnCurveVector?

[Connect .NET] Unexplained Behavior with DRange1d

$
0
0

I ran into a problem when using a DRange1d as a property in one of my classes where it would never change from null.

I managed to recreate this problem with a keyin. (The property is static just for this example to run with the keyin)

        private static DRange1d testRange { get;  set; }
        public static void RunTestCode(String unparsed)
        {
            testRange = DRange1d.NullRange;
            testRange.Extend(73.2);
            Debug.Print("testRange: " + (testRange.IsExactNull ? "Null": "Not Null"));

            DRange1d testRange2 = DRange1d.NullRange;
            testRange2.Extend(73.2);
            Debug.Print("testRange2: " + (testRange2.IsExactNull ? "Null": "Not Null"));

        }

The output is:

testRange: Null
testRange2: Not Null

Can someone explain to me what is going on?

Thanks,

Maury

[Microstation V8i Select edition 3 C++ . ] I have installed the SDK but I am having difficulties compiling the examples.

$
0
0

I get errors similar to the following for all projects: LINK : fatal error LNK1104: cannot open file 'C:\Windows\System32\MicroStation\mdlapps\myapp.dll'
I think my mdlapps dir is C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\MicroStation\mdlapps.
Do I need to set this somewhere?

Here is the full output from bmake for "myapp"

C:\PROGRA~1\Bentley\MICROS~1\examples\DialogBoxes\myapp>bmake +a
Bentley Systems Make Utility. Version 10.00.00.26, Mar 15 2018
Tue Jul 02 14:47:21 2019




[== Building C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myappcmd.h, (C:\PROGRA~1\Bentley\MICROS~1\examples\DialogBoxes\myapp\myappcmd.r) ==]
rcomp @C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\make.opt
MicroStation Resource Compiler 03.17.02
   Generating header file (C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myappcmd.h) ... done.

[== Building C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myappcmd.rsc, (C:\PROGRA~1\Bentley\MICROS~1\examples\DialogBoxes\myapp\myappcmd.r) ==]
rcomp @C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\make.opt
MicroStation Resource Compiler 03.17.02

[== Building C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myapptyp.r, (C:\PROGRA~1\Bentley\MICROS~1\examples\DialogBoxes\myapp\myapptyp.mt) ==]
rsctype @C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\make.opt
MicroStation Type Resource File Generator 03.17.02

[== Building C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myapptyp.rsc, (C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myapptyp.r) ==]
rcomp @C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\make.opt
MicroStation Resource Compiler 03.17.02

[== Building C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myapp.obj, (C:\PROGRA~1\Bentley\MICROS~1\examples\DialogBoxes\myapp\myapp.cpp) ==]
cl -IC:\PROGRA~1\Bentley\MICROS~1\include\ -IC:\PROGRA~1\Bentley\MICROS~1include\ -IC:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\    -fp:precise -GS- -EHc -GR -wd4345 -GF -favor:blend -D_X64_ -wd4701 -wd4244 -wd4564 -wd4840 -wd4702 -c -W4 -DBENTLEY_WARNINGS_HIGHEST_LEVEL -DWIN32 -DwinNT -MD -D__EXCEPTIONS -D_VISCXX -Gy -wd4996 -Ox -Oy- -Os -D_CONVERSION_DONT_USE_THREAD_LOCALE -D_SECURE_SCL=0 -DWIN32_LEAN_AND_MEAN  -DNTDDI_WIN7SP1=0x06010100 -we4692  -nologo -WX -MP -Zi -Zo -FdC:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\objects.pdb    -EHs   -fp:precise -FoC:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myapp.obj C:\PROGRA~1\Bentley\MICROS~1\examples\DialogBoxes\myapp\myapp.cpp
myapp.cpp

[== Building "C:\Windows\System32\MicroStation\mdlapps\myapp.dll", (C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myapp.obj) ==]
link -out:"C:\Windows\System32\MicroStation\mdlapps\myapp.dll"  -WX   -Ignore:4087 -Ignore:4089 -Ignore:4199 -Ignore:4281 -MANIFESTUAC:NO -Release   -debug -incremental:no -fixed:no @C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myapplink.rsp
Microsoft (R) Incremental Linker Version 14.16.27031.1
Copyright (C) Microsoft Corporation.  All rights reserved.

-dynamicbase
-dll
"-out:C:\Windows\System32\MicroStation\mdlapps\myapp.dll""-implib:C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myapp.lib""-pdb:C:\Windows\System32\MicroStation\mdlapps\myapp.pdb"
-fixed:no
C:\Users\DAMIAN~1.COU\AppData\Local\Temp\Bentley\MicroStationSDK\objects\myapp.obj C:\PROGRA~1\Bentley\MICROS~1\library\bentley.lib C:\PROGRA~1\Bentley\MICROS~1\library\mdlbltin.lib C:\PROGRA~1\Bentley\MICROS~1\library\BentleyGeom.lib C:\PROGRA~1\Bentley\MICROS~1\library\DgnPlatform.lib C:\PROGRA~1\Bentley\MICROS~1\library\dgnview.lib C:\PROGRA~1\Bentley\MICROS~1\library\BentleyAllocator.lib gdi32.lib user32.lib kernel32.lib C:\PROGRA~2\MIB055~1\2017\PROFES~1\VC\Tools\MSVC\14.16.27023\lib\x64\msvcrt.lib
C:\PROGRA~1\Bentley\MICROS~1\library\mdlbltin.lib
LINK : fatal error LNK1104: cannot open file 'C:\Windows\System32\MicroStation\mdlapps\myapp.dll'
BMAKE: call trace
    line:  414, C:\PROGRA~1\Bentley\MICROS~1\mki\dlmlink.mki
    line:  102, C:\PROGRA~1\Bentley\MICROS~1\examples\DialogBoxes\myapp\myapp.mke
Tue Jul 02 14:47:24 2019, elapsed time: 0:03

C:\PROGRA~1\Bentley\MICROS~1\examples\DialogBoxes\myapp>

Notes/Labels by program, labels with property by program

[CONNECT U12 C++] _OnPostLocate() and returning selected "Child" of a cell

$
0
0

I'm developing a DgnElementSetTool with _OnPostLocate() to return either a single "primitive" (non-complex) element like a Line or LineString OR the currently located sub-element of a cell:

private:	virtual bool _OnPostLocate(HitPathCP path, WStringR cantAcceptReason)
{
    __super::_OnPostLocate(path, cantAcceptReason);
    // get the element
	ElementHandle		eh(mdlDisplayPath_getElem((DisplayPathP)path, 0), mdlDisplayPath_getPathRoot((DisplayPathP)path));
    if (eh.GetElementType() == CELL_HEADER_ELM)
    {
    	ElementHandle		ehPart(mdlDisplayPath_getElem((DisplayPathP)path, 1), mdlDisplayPath_getPathRoot((DisplayPathP)path));
    	...
    }
    else
    {
    ...
    }
}

As I move the cursor over a cell, occasionally, the ElementHandle "ehPart" that is created returns false for ehPart.IsValid(). Why does that happen? If the ElementHandle "eh" created from the HitPathCP and tested to ensure it is a cell header, then why does

ElementHandle		ehPart(mdlDisplayPath_getElem((DisplayPathP)path, 1), mdlDisplayPath_getPathRoot((DisplayPathP)path));

sometimes result in an invalid ElementHandle ?


CONNECT Update 12 C++ PointCloudPodWriter StartStream crashing

$
0
0

Hi all,

I want to create a pod point cloud file from points I have in my buffer.

Unfortuntely my code so far crashes when I call StartStream:

My includes:

#include "Bentley/Bentley.h"
#include "Bentley/RefCounted.h"
#include "Bentley/WString.h"
#include "DgnPlatform/ColorBook.h" // before Bentley PointCloud.
#include "DgnPlatform/IPointCloud.h" // before Bentley PointCloud.
#include "Geom/dpoint3d.h"
#include "DgnPlatform/PointCloudClipHandler.h"
#include "PointCloud/PointCloudApi.h"


My code so far:

int result = 0;

Bentley::PointCloud::PointCloudPodWriter podwri;

result = podwri.Initialize(); // returns result=0;

Bentley::WString fileName(L"T:\\temp\\microstat\\test.pod");
Bentley::WCharCP path(L"T:\\temp\\microstat\\test.pod");

/// Things I tried
// int resultStartStream=podwri.StartStream(fileName.c_str());
// int resultStartStream=podwri.StartStream(path);
// int resultStartStream=podwri.StartStream(L"T:\\temp\\microstat\\test.pod");
int resultStartStream=podwri.StartStream(L"T:/temp/microstat/test.pod");

  • The path T:/temp/microstat is existing.
  • I have tried all commented StartStream function calls, but they all crash.

For compiling: I'm using Visual Studio 2017 version 15.9.11 - x64 - Release.

Any ideas or comments are very welcome!

[CE U12] How to access parametric solid using EC Query?

$
0
0

Hi,

this my question does not relate to specific API and is more about general concepts how to access elements and related data.

Also, it's just a theory and I did not write any test code yet, so maybe I will realize I am asking something obvious when some code will exist ;-)

When using ECQuery class to access design file data, there is usually 1:1 mapping between DGN element types and EC classes, also for some extended elements (type 106) like Parametric Cell related EC class exists. But how parametric solids (e.g. simple one created using union of two slabs) are represented in "EC world"?

In other words: Is it possible to access parametric elements including their properties and feature tree using EC query?

With regards,

  Jan

RGB color to Index color of objects

$
0
0

Hallo,

i search for a solution, how to match the colors of objects from the RGB value to the index value (as key-in or vba).
I've checked the wiki and forum, but didn`t find the right procedure. What I've tried is the following:

MDL LOAD SELECTBY

Selection by the Selectby MDL can be used for Index colors properly, but RGB values are not accepted.

VBA Recording of MDL Selectby

When recording the Selectby MDL, a number (selectorGlobals.color) is generated for the RGB value. Unfortunatelly the value is not consistent as it changes from file to file (e.g. color RGB 255,0,0 is in one file 7683 in an other 1283).

Thanks for any hint or idea.

Michael

[CONNECT C#] Show Element Property Selection Dialog

$
0
0

Just wondering if the sdk has available the ability to show the select property dialog that has the properties of a selected element shown and allow the user to select a property an return that selection.


Basically what you see when you add a field to text to show a element property.


thanks


JD

Excel VBA macro for microstation

[CONNECT C#] expose textfield in c#

$
0
0

Could anyone help me or tell me if its possible to get to textfield methods from C#. I need to add text fields via code. I see some posts but they are all for c++. and it appears TextField is not exposed to c#. looking at the api there are CreateForElement, CreateForModel, and CreateForFile methods that im interested in.  

thanks

JD

How to detach selected Raster image in microstation vba?

$
0
0

how to detach selected raster image in microstation vba?


Connect Update 12 - VBA Projects not saving

$
0
0

It appears that if you create a new project then it saves fine, but if you try to work on the same project after you load it, then it becomes read only, although the file itself is not read only. Trying to saveas at this point will crash your microstation and you will loose all your work. Has this been reported?

Version 10.12.00.40

What does this mean - "??È" when referring to ModelName?

$
0
0

Some elements in my drawings are reporting "??È" as the ModelName. It looks corrupted, and trying to write that text into a text file will cause an error. Has anyone seen this?

[MS V8i SS3 VBA] Questions about ILocateCommandEvents

$
0
0

Hello All,

I'd like to know when my cursor was moved to the MS menu/toolbar/tasks, it seems ILocateCommandEvents_Dynamics works only when the cursor was inside the view(black part), is it possible to know if the cursor is moved on other parts(me menu/toolbar/tasks/etc, anywhere as soon as it is not black)? Or maybe other way in MVBA. Thanks a lot.

Automated quotes - Pipes

$
0
0

Good morning everyone! :-)


I wish to obtain pipes quotes automatically, as in the attached example. (Front, top and left view, for example.)

My idea is to get a joined line (chain) for the pipe's axis and, clicking it, obtain the quotes with a macro.

Anyone of us did it in the past? Or something similar? Could you kindly help me, please?

Thanks a lot.

Best regards,

Paolo

text change after editing

$
0
0

Dear Gentleman,

i want solution.

when i edit any text the output text is reducing with size ( height & width ).

for Example:  " ASSAD "  after editing it will come " ASSAD ".

Viewing all 7260 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>