• Deleting a Cell Definition to Replace the Cells with a Different One

    Hi I'm looking for help on the question detailed above where my purpose is to delete a certain SharedCellDefinition (I failed at writing a VBA snippet for this so resorted to the CadInputQueue instead), then attach a new cell library (the code firstly…
  • RE: Find intersection point of a line passing through a plane

    Plane3dIntersectsRay3d method fails for a particular element. How to fix this issue? Sample code is given below and the Sample DGN is also attached. Option Explicit Public Sub testPlaneIntersectRay() Dim shp As ShapeElement Dim lin As LineElement…
  • CommonDialog问题解决?

    [转载Bentley中文知识库原帖] cmx_stone:我想修改一下bentley的另存对话框,在里面需要使用CommonDialog控件,在"引用"中也选取了comdlg32.ocx控件了,但是使用中我的电脑可以,放到其他电脑上就不能使用了,请问是何道理? 程序如下: Public Function SaveTo() On Error GoTo error SaveTo = "" Dim Dname As String Dim comdlg As CommonDialog…
  • Re: CommonDialog问题解决?

    [转载Bentley中文知识库原帖] MicroStation迷:在我的电脑上也能运行呀!是否需要更新VBA core。找个MicroStation V8XM或V8i的于安装包安装一下试一试。
  • Re: CommonDialog问题解决?

    [转载Bentley中文知识库原帖] cmx_stone:好的,请您看看呢,用之前在引用里勾选一下"Microsoft Common Dialog Control 6.0" [转载Bentley中文知识库原帖] MicroStation迷:把你的Function改成Sub就能运行了。MicroStation VBA中只有Sub才是可以直接运行的,Function必须被Sub调用才可。 [转载Bentley中文知识库原帖] cmx_stone…
  • Project Point onto a Plane

    Dear All, I have a point3d values and a Plane/Surface. I want to project the point onto a Plane/Surface. How Can I get that projected point using VBA Programming? Kindly clarify. Please refer the attachment: In the attachment Cyan color represents…
  • Re: Project Point onto a Plane

    Thanks Jon. I checked it. It produces a point perpendicular to the plane (or) the Nearest Point on Plane. But I want to get the height(Z values) on a plane corresponding to XY values. Is there anyother option? Refer the attachment: Majenta color…
  • Capturing an Element with ILocateCommandEvents and passing it back

    I want to write a module that processes a Mesh Surface and cuts some contours through it at variable intervals. In order to get the Mesh Surface to start with I am creating an AnalyzeMeshSurface Class Module (Implements ILocateCommandEvents …
  • If... Then... Else to check for a reference file attachment

    I have a VBA function that runs when a design file is opened and closed. However, I need to add a IF... Then... Else statement that checks to see if there is a reference file attached when the design file is opened. If the reference file is attached…
  • Dimension Style Names

    Previous versions of MS allowed for a blank space in the Dimension Style names i.e. 60_FOOT SCALE. However it seems in our current setup using MS Version 08.09.04.51 it no longer allows this space. Our identically named Text Styles still allow for a space…
  • Is element in an attachment?

    I am calling IPrimitiveCommandEvents and get the element Set ele = CommandState.LocateElement(Point, view, True) How can I determine if the element ele is in an attachment? regards Patrick Wheatley XM 08.09.04.88 Windows…
  • oDimension.PrimaryText(i)

    My dimension text has been over ridden with "123.456 dimension test text" but in my MVBA oDimension.PrimaryText has only 1 segment count and the value of PrimaryText is given as "*" which is clearly incorrect. Any ideas? regards Patrick…
  • Help for VBA 3D

    Hi, I'm searching a good teachers who can say me how to start with VBA and mostly VBA 3D on Microstation V8 Xm version. Please answer me, I already do some 2D things but nothing in 3D. Thanks Alain
  • Private Sub ILocateCommandEvents_LocateReset() not working

    While within my MVBA class ILocateCommandEvents pressing the Reset button brings up a Pop Up window instead of running the sub Private Sub ILocateCommandEvents_LocateReset(). what is the solution? Happy New year Patrick XM 09…
  • Perpendicular Lines to ComplexStringElement (or ChainableElement)

    Hi, Could anyone give me any tips on how to draw a perpendicular line of a set length from a point on a ComplexStringElement. What I'm trying to do is place distance marks along a centreline (made up of lines, arcs and curves). Using the…
  • Re: element.redraw does not work in XM?

    Hi Krister, I think you should use IsHighlighted element property, it does all work for you. There is a limitation, but it depends what exactly you want to achieve: If you set IsHighlighted property, the used color is always the highlight color…
  • MVBA Interface

    Hi, I have an idea for a couple of MVBA Projects, but they are dependant on me being able to build suitable interfaces for them. Can anyone advise me haw I access what I believe to be standard interface objects, such as element attribute drop downs…
  • Using TextLine on TextNodeElement and Stacked Fractions

    I have found that if I enter a single line within Microstation into a TextNodeElement using the "Edit Text" tool that contains a stacked fraction (ex. '3#4" DEAD-END TEE' ) I find that my TextLinesCount becomes 3 and my TextLine(1), TextLine(2) and TextLine…
  • Loading References (DLL, OCX, etc.)

    I realize this is a general VBA question but here goes. I'm creating a series of planned AutoRun MVBA's for our users to do a number of behind the scenes tasks. These forums have been a valuable resource for finding out how to handle some odd…
  • Create Complex Shape Element - argument type mismatch

    Hi, I wrote short script for longitudinal profile… and I need draw filled half of the circle. Idea is to draw line plus arc and then create complex shape. part of the code looks like this: Dim carka As LineElement Dim oblouk As ArcElement Dim vrchol…
  • Disabling Windows [x] close button

    Is it possible to actutally remove the windows [x] (close) button in XM so a users has to close down microstation using a custom button? Thanks John
  • Re: Disabling Windows [x] close button

    There does not appear to be events directly tied to opening and closing of Microstation, but there are design file events for load and unload. Below is an example straight out of the help file for VBA for Microstation. (Use the little "?" button in the…