Browse By Tags

  • [c#][V8i] Getting unknown error when get ComplexShapeElement.Area()

    Hello everyone, I'm getting an unknown error when trying to get ComplexShapeElement.Area(), it says as image shown below, please give me some advices to solve this issue. Thank you all!
  • [c#][V8i] Getting unknown error when get ComplexShapeElement.Area()

    Hello everyone, I'm getting an unknown error when trying to get ComplexShapeElement.Area(), it says as image shown below, please give me some advices to solve this issue. Thank you all!
  • [V_08.11.09.357][C#] scan IsVertexList elements only

    Hello everyone, As the subject I mentioned, I want to scan IsVertexList elements only when using ElementScanCriteriaClass, is it possible to be done? Thank you.
  • 使用addin方式创建联合区域

    请问怎样使用addin C#语言调用mdl函数创建DWG中的联合区域元素? 目前的困难主要集中在对这几个参数在addin下的赋值,请大佬教我这几个参数该怎么获取
  • C# MS V8i SS3, form cut on another laptop

    good day in a Microstation addin (dll) I have a Form which I attach like this public static void startMaincoalTool(string unparsed) { MaincoalTool mcTool = new MaincoalTool(); mcTool.AttachAsTopLevelForm(Main.addin, true, "MaincoalTool"); …
  • Microstation V8i SS10 C# Development - How to get the point from LocateCommand

    LocateCommand locateCommand = new LocateCommand(); locateCommand.OnLocateFilter += Filter; locateCommand.OnAccept += (o, args) => LocateCommandOnOnAccept((CellElement)args.Element); application.CommandState.StartLocate(locateCommand); I can…
  • 老师好,我想请问下,在V8i中 addin开发,定制dgnlib和Robbin界面以后,使用V8i task却找不到图标,定制的菜单工具栏却存在。当我点击一次工具后,关闭再次去点击显示已加载,mdl开发的工具却没有问题,这是操作上的问题吗?

    老师好,我想请问下,在V8i中 addin开发,定制dgnlib和Robbin界面以后,使用V8i task却找不到图标,定制的菜单工具栏却存在。当我点击一次工具后,关闭再次去点击显示已加载,只能像开发测试一样,关闭从新打开,mdl开发的工具却没有问题,这是操作上的问题吗?
  • 在不同工作单位下进行元素复制

    使用C# addin 在Microstation V8i下开发,发现在复制元素的过程中会出现单位转换的问题。 就是会将需要复制的元素的坐标单位转换成目标文件单位后再添加到目标文件上。 想请教各位大佬,有没有办法在使用copyElement时候不转换单位只使用实际坐标进行复制呢? 或者有其他可以达到目的的方式?
  • 【MS v8i c# c++】如何切换V8i的工作空间的project

    v8i如何实现在打开dgn文件之前,切换到正确的工作空间。 像CE下的有workspacemanager能做到切换workset,那么如何在v8i下实现切换project呢?
  • [V8i C#] Prevent Form from closing

    I made a WinForm and used this code to open it via a Keyin: Frm_Main frm = new Frm_Main(); WindowManager winManager = Bentley.Windowing.WindowManager.GetForMicroStation(); Size minSize = new Size(frm.MinimumSize.Width, frm.MinimumSize.Height); …
  • 【V8i C#】关于Raster Manager添加图片问题

    老师前辈们好,现V8i开发过程中碰到如下问题: 想以代码控制的方式在V8i视图中添加图片参考,使用了RasterManager接口,却并没有实现功能,问题出在哪里呢? string path = @"E:\测试文件\testPNG.png"; Bentley.Interop.MicroStationDGN.Application app = Utilities.ComApp; Rasters pRasters = app.RasterManager.Rasters; pRasters.Attach…
  • 调用 BuildArrayFromContents 时出现“尝试读取或写入受保护的内存。这通常指示其他内存已损坏”错误

    各位老师好! 我用的是Microstation V8iss4 ,在调用以下代码时, eleEnum = MsApp.ActiveModelReference.Scan(eleScanCri); Element[] attElementArr = eleEnum.BuildArrayFromContents(); 当调用到 BuildArrayFromContents 方法时经常会报出以下错误 “尝试读取或写入受保护的内存。这通常指示其他内存已损坏” 请问有人遇到跟我相同的问题吗?
  • 【Mstn v8i C#】Copy the Contents of a Fence

    老师好 ! 参考MicroStation VBA.chm 中的Copy the Contents of a Fence例子...希望能够获取围栅范围内的元素 并进行复制和平移,但是结果出现未知错误 代码如下 app.CreateDesignFile(@"E:\PassData\ChannelSteel.dgn", EndFilePath, true); Point3d[] Po = new Point3d[4]; Po[0] = app.Point3dFromXY(0,0);…
  • 【Mstn v8i C#】 Addin中创建元素

    符工 你好! 昨天根据您说的用 CreateLineElement和CreateTextElement ,已经 绘制表格并添加了文本信息... 但是在向dgn文件添加元素的时候发现,绘制后的表格文本(图2) 离原dgn文件的元素(图3)距离很远并且大小比例也不同(图1).. 请问符工这是哪里没做好造成的?该如何调整? (图1) (图2) (图3) 代码: BCOM.Application app = Utilities.ComApp; app.CreateDesignFile…
  • [MSV8i C#]打开文件的问题

    各位老师好: 使用 CreateDesignFile创建新的DGN文件 并向文件里面添加线元素的时候发现 ,如果CreateDesignFile的参数设置为true 则是关闭旧文件打开新文件 添加元素,但是改为false 新文件不打开但是元素也不会添加进去.. 也试过CopyDesignFile 无论是false或者true 均不能添加元素... 请问老师这是什么原因?该怎么做才能实现新文件不必打开 就能向其添加元素... BCOM.Application app = Utilities…
  • [MSV8i C#]V8i下有ManagedTextTableExample的例子吗?

    符工 MS CE这个例子ManagedTextTableExample 在V8i上是否有相应的例子??
  • [MSV8i C#]插入图片和表格

    符工 你好! 1. Microstation是否能将png文件直接导入到dgn文件中? 2. Microstation是否能向dgn文件导入表格信息? 如果可以 有什么接口可以实现?
  • 请问如何捕捉到一个单元里面的弧元素 (C#/Addins)

    各位老师好,如上,请问如何捕捉一个单元内部的弧元素?
  • 【V8i C#】关于调用ActiveModelReference.CopyElement()方法得到一个新元素后,再对新元素使用.Move()方法却未移动问题

    老师你好,现学习过程中碰到问题如下: 我在继承自ILocateCommandEvents的类的Accept(Element pElement,ref Point3d pPoint,View view)方法中有如下代码 { Point3d setPoint = app.Point3dFromXYZ(20, 10, 0); newElement = app.ActiveModelReference.CopyElement(pElement); newElement.Move(ref setPoint…
  • 使用Addins在V8iSS3下开发停靠窗体,拖动后窗体内容丢失

    如左图所示,我新做了一个可以停靠的窗体,并在窗体中添加了treeView控件。当我按住主窗体标题栏拖动窗体的时候,出现了一个错误!窗体里的TreeView不见了。请问各位大神这个问题怎么解决呢?很影响体验呀。
  • 问一下小白的问题,c#Microstation V8I 有SDK吗?

    如果有的话,在哪里可以找到呢? 这个问题有点弱智,请老师们多多包涵。
  • c#MicrostationV8I 做一个选择单个实体的代理,程序运行过程中无法暂停供用户选择

    代码如下: List<MsdElementType> types = new List<MsdElementType>(); types.Add(MsdElementType.Line); types.Add(MsdElementType.Arc); SelectSingleElement tool = new SelectSingleElement(types); tool.mSelectEvent += tool.mSelectItemEvent; Application app = Utilities…
  • c#MicroStation中,ILocateCommandEvents接口方法中,Accepted为true时,无法进入到Accept方法中,一直找不到原因

    public void LocateFilter(Element Element, ref Point3d Point, ref bool Accepted) { if (MsdElementType.Line == Element.Type) { Accepted = true; } } 跟进去看了,可以执行到 Accepted = true;这里,但接下来始终无法进入到 public void Accept(Element Element, ref Point3d Point, View…
  • c#MicroStation在实现框选对象中遇到的一个疑惑:IncludeOnlyWithinRange函数的Z取值如何取值合适?

    思路是,程序根据框选的范围确定Range3d的大小,然后利用IncludeOnlyWithinRange函数来筛选选定范围内的实体,但现在遇到的问题是由于选择框一般是二维的,设置成三维的话在使用效果上会大打折扣,而rang3d是三维的,那这里就遇到了range的Z值如何确定的问题?我目前采用的方法是遍历所有实体,找到ZMAX,这样做的效率很低,请老师指点一下更优方法。谢谢啦!
  • c#如何得到MicroStation中实体或智能实体的组成面?

    SmartSolidElement sse = eleSmart.AsSmartSolidElement; ElementEnumerator eeSub = sse.ExtractAllSurfaceFromSolid(); foreach (Element eleSub in eleSubs) { app.ActiveModelReference.AddElement( eleSub ); eleSub .Rewrite(); } 跟进去看了,得到三个面,complexshape…