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

[CONNECT C#] Redirect unhandled exception messages

$
0
0

When a .NET DLL creates an unhandled exception, it usually results in MicroStation crashing.  MicroStation's crash dialog doesn't provide any useful information.

Is there a way I can instruct a .NET app to redirect error output to MicroStation's Message Center? A web search reveals solutions that assume (a) an executable not a DLL and (b) a console app when it's simple to redirect StdErr.


MicroStation Programmer

$
0
0

Hi All, We are looking for an experienced MicroStation Programmer to work with us at our Bangalore office. Anybody interested, please contact Uma.HR@magnasoft.com. PM me for JD.

How to know the User Data Linkage Index?

$
0
0

I need to find the element attribute user data linkage index or read the user data linkage without index in vba?

commit error 1005

$
0
0
can anyone tell me why I'm getting an history commit error 1005 using vba OnDesignFileClosed
using V8i SS2. VBA code as follows.
Dim WithEvents V8i As Application
Private Sub Class_Initialize()
    Set V8i = Application
End Sub
Private Sub V8i_OnDesignFileClosed(ByVal dgnFileName As String)
    CadInputQueue.SendKeyin "History Commit Automated Commit"
End Sub

mdl's (.mc files) in Connect 13 with VS 2017 .NET Framework 4.6.2

$
0
0

I want to compile some older mdl's that work in V8i SS4 to see what errors may show for Connect.  Can I use the previous mke files and is there a command line bmake for VS 2017?  I added the lines to the mke file as suggested in the sdk tools:

PolicyFile = MicroStationPolicy.mki
MDLMKI = $(MSMDE)mki/
mdlLibs = $(MSMDE)mdl/library/
dirToSearch = $(MDLMKI)
genSrc = $(o)
%include $(MDLMKI)mdl.mki

For MSV8i SS4 with VS 2010, I would compile the mdl's in the Developer shell with the following command line

bmake +dBUILD_USING_VS2010 +dFrameworkSDKDir=C:\WINDOWS\Microsoft.NET\Framework -dDLM_NO_SIGN

When I use the bmake command line given above, I get the following error message in the dev shell:

BMAKE: no rules to build C:\Users\train21\AppData\Local\Temp\Bentley\MicroStationSDK\objects\ctAttachCellLib.mo
BMAKE: call trace
line: 88, D:\ConnectVersions_CT-Programming\mdls_Connect\ctAttachCellLib\ctattachcelllib.mke

PolicyFile = MicroStationPolicy.mki
MDLMKI = $(MSMDE)mki/
mdlLibs = $(MSMDE)mdl/library/
dirToSearch = $(MDLMKI)
genSrc = $(o)
%include $(MDLMKI)mdl.mki

appName		= ctAttachCellLib

%if defined (SOURCEDIR)
    baseDir    = $(SOURCEDIR)export/
%else
    %if defined (_MakeFilePath)
	    baseDir    = $(_MakeFilePath)
    %else	
        %if defined (powerc) || (m68k)
            baseDir    = /
        %else
            baseDir    = ./
	%endif
    %endif
%endif
												
privateInc	= $(baseDir)

# Create a macro for portable library extensions.
	libraryExt = dlo

# Display compile warning in MS/J
moreMdlCompileOpts + -b

#----------------------------------------------------------------------
#   The following defines the dependency list for the CODE portion
#   of this application. Included are any CODE libraries or objects
#   from any related applications. Typically these files are linked
#   together into a file with a '.mp' extension. (Mdl Program module)
#
#   NOTE: ALL literal strings which would be contained in a .mc file
#         should be placed in a messageList resource located in the
#         directory pointed to by 'langSpec'. All strings should be
#         loaded from a messageList resource at runtime.
#----------------------------------------------------------------------

appObjects = 		   		\
    $(o)$(appName).mo	    \
    $(mdlLibs)ditemlib.$(libraryExt)

#----------------------------------------------------------------------
#   The following defines the dependency list for any NON-Translatable
#   resources used by this application. Typically this includes any
#   command table definitions or resource type definitions. This list
#   would also contain the completed CODE portion of the application.
#   Typically these files are lib'd together into a file with a '.mi'
#   extension. (Mdl Intermediate application)
#----------------------------------------------------------------------


appRscs = \
    $(o)$(appName).mp #\
#    $(o)$(appName).rsc 

#---------------------------------------------
#	Compile dialog resource file using rcomp
#---------------------------------------------
#$(o)$(appName).rsc		    : $(baseDir)$(appName).r \
#							$(baseDir)$(appName).h   

#---------------------------------------------
#	Compile the MDL source file using mcomp
#---------------------------------------------
$(o)$(appName).mo	    	    : $(baseDir)$(appName).mc \
							# $(baseDir)$(appName).h

#----------------------------------------------------------------------
#	The following section generates the MDL Program module. This
#	module should contain ALL CODE resources and/or libraries used
#	by the application.
#----------------------------------------------------------------------

$(o)$(appName).mp			: $(appObjects)
    $(msg)
    > $(o)make.opt
    $(linkOpts) 
    -a$@
    $(appObjects)<
    $(MlinkCmd) @$(o)make.opt 
    ~time

#
#----------------------------------------------------------------------
#	The following section generates the MDL Intermediate module. This
#	module contains the MDL CODE module and any non-translatable
#	resource modules.
#
#	NOTE: This module MUST be placed in the directory pointed to by
#         the 'o' macro defined in MDL.MKI. This module is
#         shipped as part of the Foreign Language Translation Kit.
#----------------------------------------------------------------------

$(mdlapps)$(appName).ma		: $(appRscs)
    $(msg)
    > $(o)make.opt
    -o$@
    $(appRscs)<
    $(RLibCmd) @$(o)make.opt
    ~time

Thanks for any help,

Donna

[CONNECT C++] CustomProperty has no DisplayLabel

$
0
0

CustomProperty inherits from ECProperty yet has no visible DisplayLabel accessor...

error C2039: 'SetDisplayLabel': is not a member of 'Bentley::DgnPlatform::CustomProperty'

Is that by design or inadvertent?  I would like to be able to assign captions to my Item Type property definitions.

[CONNECT .NET] Keyin not mapped to method

$
0
0

Here's an extract from my KeyIn table...

// commands.xml
<KeyinHandler Keyin="FLEXITABLE SET FORMULA"         Function="FlexiTable.KeyinCommands.CmdSetFormula"/>

Here's the code that implements that command...

//KeyinCommands.cs
public static void cmdSetFormula (string unparsed) {}

So why do I see this at runtime?

An exception of type 'Bentley.MstnPlatformNET.Exceptions.CommandTableException' occurred in USTATION.dll but was not handled in user code
Additional information: Keyin "FLEXITABLE SET FORMULA" not mapped to method in AddIn FlexiTable.FlexiTable

vba CE: ElementParentIndex doesn't work for complex elements.

$
0
0

the above mentioned method always retuns = 0 in ustn ConnectEdition

    Set ec = oEle.Cache
    lngIndex = oEle.CacheIndex
    lngIndexParent = ec.ElementParentIndex(lngIndex)

please fix

cheers Ingo


[V8i SS3 VBA] combine two vertices list

$
0
0

Hello,

I have two vertices list of two lines

Dim vertices1() As Point3d
Dim vertices2() As Point3d
(...)
vertices1 = myelement1.AsVertexList.GetVertices
vertices2 = myelement2.AsVertexList.GetVertices

I want to combine them in one list to create a new line element.

Do you have any idea how to do this ?

[CONNECT U13] DependencyManager: When the Root Element status is changed (DEPENDENCY_STATUS_CHANGED) is the "pre-changed" root element available?

$
0
0

When a Root Element of a Dependency Linkage is modified, is the "pre-modified" version of that Root Element cached anywhere where one can obtain a ElementHandle to it?. The Dependent Element is passed into the OnRootsChanged() function, and one can use "dependencyLinkage.root.elemid[]" to get the Root Element(s), but these are the Root Element(s) AFTER they've been changed. Can you get the state of the element PRIOR to the current CHANGE?

My Root Element can be moved (positional change only) or modified (scaled/etc). It's the case where the Root's size is changed that it would be helpful to be able to have access to the original sized element.

Bruce

[CONNECT U13] DependencyManager: When the Root Element status is changed (DEPENDENCY_STATUS_CHANGED) is the "pre-changed" root element available?

$
0
0

SORRY FOR THE DUPLICATE POST - I CANNOT REMOVE IT

When a Root Element of a Dependency Linkage is modified, is the "pre-modified" version of that Root Element cached anywhere where one can obtain a ElementHandle to it?. The Dependent Element is passed into the OnRootsChanged() function, and one can use "dependencyLinkage.root.elemid[]" to get the Root Element(s), but these are the Root Element(s) AFTER they've been changed. Can you get the state of the element PRIOR to the current CHANGE?

My Root Element can be moved (positional change only) or modified (scaled/etc). It's the case where the Root's size is changed that it would be helpful to be able to have access to the original sized element.

Bruce

[C++] Using libzippp libary in MDL-App

$
0
0

Hey Guys,

i want to use an extern libary, in this case the libzippp libary, to work with zip-files. I'm working with Visual Studio 2017 and I linked every libs staticly in the .mke file:

LINKER_LIBRARIES        = $(mdlLibs)bentley.lib \
                          $(mdlLibs)mdlbltin.lib \
                          $(mdlLibs)BentleyGeom.lib \
                          $(mdlLibs)DgnPlatform.lib \
                          $(mdlLibs)dgnview.lib \
                          $(mdlLibs)RmgrTools.lib \
                          $(mdlLibs)BentleyAllocator.lib \
                          $(mdlLibs)ImageLib.lib \
                          $(baseDir)zip.lib \
                          $(baseDir)zlibd.lib \
                          $(baseDir)bzip2.lib \
                          $(baseDir)libzippp.lib

In my main-file I'm using this line of code to open a specific zip file after clickhookfunction:

            if (mdlDialog_fileOpen(file_name, NULL, 0, NULL, L"*.zip", NULL, L"Select Zip") == SUCCESS)
            {
                wcscpy(fnw, file_name.c_str());

                printf("Dateiname %ls \n", fnw);
                printf("FileNameAndExtension %ls \n", Bentley::BeFileName::GetFileNameAndExtension(fnw));
                printf("DirectoryName %ls \n", Bentley::BeFileName::GetDirectoryName(fnw));
                printf("Extension %ls \n", Bentley::BeFileName::GetExtension(fnw));
                wstring ws(fnw);
                string zip_file(ws.begin(), ws.end());
                printf("Zip Begin%s \n", zip_file);
                ZipArchive z1(zip_file);
                z1.open(ZipArchive::READ_ONLY);
                printf("File Open:  %s \n", zip_file);
                z1.close();
            }

Has anyone experience with those thinks? Thanks!

Regards, Eugene

[CONNECT C++] Error LNK2001 calling function from another cpp file

$
0
0

Hi,

I already asked a similar question and the problem was a missing library in the *.mke file.
At the moment I have my "main" .cpp file and I want to call an Initialization function from another .cpp file.
I did it in a similar way to the "exampleSolids" program inside the Microstation SDK when it calls through a key-in an initialization function that is located in another file (e.g. exampleParametricFeatureTree).

Here you can see my main .cpp file:

//ParametricFeature.cpp

#include "ParametricFeatures.h"

Public RscFileHandle rfHandle; /* Resource file handle */

.
.
.

// Map key-in to function
static MdlCommandNumber    commandNumbers[] =
{
	{ (CmdHandler)ParametricFeatures_cmdExit, CMD_PARAMETRICFEATURES_EXIT },
	{ (CmdHandler)GetSmartFeatureTree, CMD_TREE },
	{ (CmdHandler)startShapeProcessor, CMD_SHAPE },
	0
};

.
.
.

/*---------------------------------------------------------------------------------**//**
* @description  MdlMain
* @param        argc      The number of command line parameters sent to the application.
* @param        argv[]    The array of strings sent to the application on the command line.
* @bsimethod                                                              Bentley Systems
+---------------+---------------+---------------+---------------+---------------+------*/
extern "C" DLLEXPORT  void MdlMain(int argc, WCharCP argv[]) 
{
	//	Resources are defined in .r files
	mdlResource_openFile(&rfHandle, NULL, RSC_READONLY);	
	//	Register command numbers to enable you key in a command name to start a command
	mdlSystem_registerCommandNumbers(commandNumbers);
	//	Load the command table defined in ParametricFeatures.r
	mdlParse_loadCommandTable(NULL);

}



The header:

//ParametricFeature.h

#include <DgnView\DgnTool.h>
.
.
.

#define CMD_TREE 0x0100000000000000UI64
#define CMD_SHAPE 0x0200000000000000UI64
#define CMD_PARAMETRICFEATURES_EXIT 0x0300000000000000UI64

USING_NAMESPACE_BENTLEY;
USING_NAMESPACE_BENTLEY_DGNPLATFORM;
USING_NAMESPACE_BENTLEY_MSTNPLATFORM;
USING_NAMESPACE_BENTLEY_MSTNPLATFORM_ELEMENT;
USING_NAMESPACE_SMARTFEATURE;

void ParametricFeatures_cmdExit(WCharCP unparsedP);
void startShapeProcessor(WCharCP unparsedP);
StatusInt GetSmartFeatureTree(WCharCP unparsedP);



The line that generates problem is the one regarding the "startShapeProcessor" function.
Here you can see the .cpp file where is defined:

#include "ParametricFeatures.h"

struct ShapeProcessor : ElementGraphicsTool
{

protected:

	ShapeProcessor(int cmdName)
	{
		SetCmdName(cmdName, 0);
	}

	virtual BentleyStatus _OnProcessSolidPrimitive(ISolidPrimitivePtr& geomPtr, DisplayPathCR path) override { return ERROR; }   // Promote capped surface to solid body and un-capped surface to sheet body...
	virtual BentleyStatus _OnProcessBsplineSurface(MSBsplineSurfacePtr& geomPtr, DisplayPathCR path) override { return ERROR; }   // Promote surface to sheet body...
	virtual BentleyStatus _OnProcessCurveVector(CurveVectorPtr& geomPtr, DisplayPathCR path) override { return ERROR; }   // Promote region to sheet body...
	virtual BentleyStatus _OnProcessPolyface(PolyfaceHeaderPtr& geomPtr, DisplayPathCR path) override { return SUCCESS; } // Don't convert a closed mesh to a BRep (and don't collect), can be expensive for large meshes...


	/*---------------------------------------------------------------------------------**//**
	*@bsimethod                                                              Bentley Systems
	+---------------+---------------+---------------+---------------+---------------+------*/
	virtual bool _CollectCurves() override { return false; }    // Tool supports and collects profile.
	virtual bool _CollectSurfaces() override { return false; }   // Tool does not support solid face.
	virtual bool _CollectSolids() override { return false; } // Tool does not support solid body.

	/*---------------------------------------------------------------------------------**//**
	* Overriding some base class methods to control work flow of the  tool
	* @bsimethod                                                              Bentley Systems
	+---------------+---------------+---------------+---------------+---------------+------*/
	private: StatusInt          _OnElementModify(EditElementHandleR eeh)           override { return SUCCESS; } // pure virtual method, sub-class must override!
	private: bool               _OnResetButton(DgnButtonEventCR ev)                override { _OnRestartTool(); return true; }

	/*---------------------------------------------------------------------------------**//**
	* Return true if this element has the required geometry and should be accepted.
	* @bsimethod                                                              Bentley Systems
	+---------------+---------------+---------------+---------------+---------------+------*/
	virtual bool _IsElementValidForOperation(ElementHandleCR eh, HitPathCP path, WStringR cantAcceptReason) override
	{
		return true;
	}

	/*---------------------------------------------------------------------------------**//**
	* Install a new instance of the tool. Will be called in response to external events
	* such as undo or by the base class from _OnReinitialize when the tool needs to be
	* reset to it's initial state.
	* @bsimethod                                                              Bentley Systems
	+---------------+---------------+---------------+---------------+---------------+------*/
	virtual void _OnRestartTool() override
	{
		InstallNewInstance(GetToolId());
	}

public:

	/*---------------------------------------------------------------------------------**//**
	* Method to create and install a new instance of the tool. If InstallTool returns ERROR,
	* the new tool instance will be freed/invalid. Never call delete on RefCounted classes.
	* @bsimethod                                                              Bentley Systems
	+---------------+---------------+---------------+---------------+---------------+------*/
	static void InstallNewInstance(int toolId)
	{
		ShapeProcessor* tool = new ShapeProcessor(toolId);

		tool->InstallTool();
	}


   /*=================================================================================**//**
   * Functions associated with command number for starting tool.
   * @param[in] unparsed Additional input supplied after command string.
   +===============+===============+===============+===============+===============+======*/
	Public void startShapeProcessor(WCharCP unparsedP)
	{
		// NOTE: Call the method to create/install the tool, RefCounted classes don't have public constructors...
		ShapeProcessor::InstallNewInstance(2);
	}

};


In the .mke file the source files for the are specified too:
PolicyFile = MicroStationPolicy.mki

appName     =  ParametricFeatures
sAppName    =  ParametricFeatures

MDLMKI = $(MSMDE)mki/
mdlLibs = $(MSMDE)library/

#dirToSearch = $(MDLMKI)

#genSrc = $(o)

%include $(MDLMKI)mdl.mki 

.
.
.

#--------------------------------------------------------------------------------------
#    Create object files
#--------------------------------------------------------------------------------------
$(rscObjects)$(sAppName).rsc     : $(baseDir)$(sAppName).r

$(o)$(sAppName).h                : $(baseDir)$(sAppName).r

#--------------------------------------------------------------------------------------
#    Set up to use dlmcomp.mki and dlmlink.mki
#--------------------------------------------------------------------------------------
appObjects = \
	$(o)$(appName)$(oext) \
	$(o)ShapeProcessor$(oext) \

DLM_OBJECT_DEST         = $(o)
DLM_NAME                = $(appName)
DLM_OBJECT_FILES        = $(appObjects)
DLM_LIBDEF_SRC          = $(_MakeFilePath)
DLM_SPECIAL_LINKOPT     = -fixed:no     # Notify linker this library does not require a fixed base address to load
DLM_NO_DLS              = 1             # USE DLLEXPORT IN .CPP
DLM_NO_DEF              = 1
DLM_NOENTRY             = 1
DLM_NO_MANIFEST         = 1             # If not set linker embeds your current (developer) patched MSVCRT version manifest in output dll.  This is not desirable and produces side-by-side CLIENT ERROR: 14001)
DLM_NO_SIGN             = 1             # If not set and no certificate found, ERROR: 'singleton' is not recognized as an internal or external command
DLM_NO_INITIALIZE_FUNCTION  = 1
DLM_DEST                = $(mdlapps)

LINKER_LIBRARIES + $(mdlLibs)Bentley.lib
LINKER_LIBRARIES + $(mdlLibs)BentleyGeom.lib
LINKER_LIBRARIES + $(mdlLibs)BentleyAllocator.lib
LINKER_LIBRARIES + $(mdlLibs)DgnPlatform.lib
LINKER_LIBRARIES + $(mdlLibs)DgnView.lib
LINKER_LIBRARIES + $(mdlLibs)mdlbltin.lib
LINKER_LIBRARIES + $(mdlLibs)PSolidCore.lib 
LINKER_LIBRARIES + $(mdlLibs)RmgrTools.lib
LINKER_LIBRARIES + $(mdlLibs)SmartFeature.lib 

#--------------------------------------------------------------------------------------
#    Compile the source files for the DLM
#--------------------------------------------------------------------------------------
$(o)$(appName)$(oext)       : $(baseDir)$(appName).cpp $(baseDir)$(appName).h

$(o)ShapeProcessor$(oext)	: $(baseDir)ShapeProcessor.cpp $(baseDir)$(appName).h

%include $(MDLMKI)dlmlink.mki

.
.
.



The error that i have is the following:


I don't understand what's missing, does anyone of you has any suggestion?

how to apply dimension style to existing dimension element using c# in Connect edition?

$
0
0

Hi All,

              I am working Connect edition Update 10 with c#. i want apply the dimension style to existing dimension element, can any one please give me the suggestion to do this.

Thanks & Regards,

Karthik keyan.

            

Does the MicroStation CONNECT SDK provide an API or classes to customize the FBX export process?

$
0
0

For instance, I would like to customize the names of the individual meshes when exporting to FBX so they use the Linkage IDs of the original meshes in the DGN.

My original files are DGNv7 formats that I convert to v8 format using the MicroStation Batch Process. The FBX export process works fine, but I need to generate a FBX file that's more meaningful in terms of mesh names. By default, every mesh is named as per the following pattern: "Mesh 01", etc.. 

My understanding so far is that I could have 2 options:

1. If the MicroStation API offers access to their FBX exporter classes, etc., then I could use this to create my own custom FBX exporter that produces a more meaningful FBX file. 

2. If NO such API is available, then most likely I'll have to use the Autodesk FBX SDK to myself create my own FBX exporter from scratch.

The idea is that I have DGN files and I want to associate properties (metadata) with individual elements of the design file. These properties are in a database, and the only way to map a mesh in the FBX with my metadata is via some ID that is unique per element. Otherwise, with "Mesh 01/02", it's impossible.

I'm using MicroStation CONNECT Edition Update 13 (10.13.01.01) with SDK 10.13.00.48.


[V8i SS3 VBA] Create complex shape

$
0
0

Hello,

I want to program a vba macro to create complex shape automatically , each shape is composed by multilines.

I thought to create a new lineString with combining lines together and then create a shape for each closed line but I found some difficult to achieve it.

I should mentioned that I work with non-coplanar elements.

Here is an example : communities.bentley.com/.../8463.create_5F00_complexShape_5F00_vba.dgn

.

[CE U13 .NET] Element Type 106 get Children

$
0
0

I prefer a solution for .NET but other Solutions are welcome too.

In my DGN I created a simple square and added some XAttribute Data to it. Then i extruded this element to a cube.
Calling the function GetChildren() gives me no result. I did called ExposeChildren before that but the result is false. Only when I give as reason the number 100 (cast to the enum), then I get a true as result but still no children.
I did read in a different thread that Bentley doesn't show the childrens for every Element. I only want to read data from that element and change them when necessary. When scanning the whole Model, I get that element with the data. Scanning the whole Model in that case is no option.

I did looked into the examples from the SDK but I didn't found something. I have no clue what to try next. I did tried to get the information via the Interop Element but because this is no Cell (can't convert to a cell), I dont have access to the Function to get the sub elements.
I mean there must be a solution to this without scanning the whole Model.

[CONNECT C#] - Issue with TagElement.ReplaceInModel(null)

$
0
0

I'm trying to update the URL for Engineering Links in a collection of DGN files. The problem is that I seam to be creating duplicates of the TAG when writing the updated element back into the model.

After processing a file, following the engineering link still takes you to the old address and not the new one.

/// <summary>
/// Scans model looking for tag elements processing them withScans model looking for tag elements, processing them with 
/// <see cref="TagElementProcessor(Element, DgnModelRef)"/>
/// </summary>
/// <param name="model">The model to scan</param>
private void UpdateEngineeringLinks(DgnModel model) {
    var criteria = new ScanCriteria();
    var elementTypes = new MSElementType[] { MSElementType.Tag };
    criteria.AddElementTypes(elementTypes);
    criteria.SetModelRef(model);
    var status = criteria.Scan(TagElementProcessor);
}

/// <summary>
/// Call back method for UpdateEngineeringLinks model scan. <see cref="Bentley.DgnPlatformNET.ScanDelegate"/>
/// <para>
/// If the element is an internet url tag, get the current value and then use <see cref="UpdateValue(string, out bool)"/>
/// to perform a replace of the matching part. Then if updated, set as the new value for the tag.
/// </para>
/// </summary>
/// <param name="el">The current element that matches the scan criteria</param>
/// <param name="modelRef">The model</param>
/// <returns></returns>
public StatusInt TagElementProcessor(Element el, DgnModelRef modelRef) {
    if(el.ElementType == MSElementType.Tag) {
        var model = modelRef.GetDgnModel();

        if (model.IsReadOnly) {
            return StatusInt.Error;
        }

        TagElement tagElement = (TagElement)el;
        if(tagElement.TagSetName.Equals( "internet", StringComparison.InvariantCultureIgnoreCase)&& tagElement.TagName.Equals("url", StringComparison.InvariantCultureIgnoreCase)) {

            var oldValue = tagElement.GetTagValue().ToString();
            var newValue = UpdateValue(oldValue, out bool updated);

            if (updated) {
                LogDetails.AppendLine($"Updating Engineering link {tagElement.TagName} from '{oldValue}' to '{newValue}'");
                tagElement.SetTagValue(newValue);
                tagElement.ReplaceInModel(null);
            } else {
                LogDetails.AppendLine($"Skipping Engineering link {tagElement.TagName} with value '{oldValue}'");
            }

            return StatusInt.Success;
        }
    }

    return StatusInt.Error;
}

Am I missing something? (easily done given the poor quality of the API documentation).

Dimension Style Issue in Connect Edition using c#.

$
0
0

Hi All,

           i am using Connect edition with c# and i wrote following code for update the dimension left margin but when executing the code connect edition application automatically abort please any one let me know y its happen.

BCOM.Application app = BMI.Utilities.ComApp;
app.ActiveSettings.DimensionStyle.LeftMargin = 0.5;

Thanks & Regards,

Karthik keyan

[CONNECT C# addin] app does not release excel COM objects

$
0
0

I have an addin that connects to excel and writes things to the excel file.

I am running into a problem where the addin is not releasing the excel COM objects. I know I am releasing everything correctly in my code. the only way I have been able to get the objects released is by closing microstation.

I put the same code into a stand alone app for connecting to an excel COM object and releasing it via code and it is released (so that verified I am releasing it). So does anyone know why MicroStation is holding onto this?

Any one ever ran into this or have any ideas to try.

this posts describes how to release COM objects, but again a stand alone app has no problem releasing the COM objects.

https://stackoverflow.com/questions/25134024/clean-up-excel-interop-objects-with-idisposable/25135685#25135685

Viewing all 4331 articles
Browse latest View live


Latest Images

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