Quantcast
Channel: MicroStation Programming
Viewing all 25671 articles
Browse latest View live

Forum Post: RE: [CE UPDATE 12 C++] DEVEV command unknown

$
0
0
[quote userid="3191" url="~/products/programming/microstation_programming/f/microstation-programming---forum/177428/ce-update-12-c-devev-command-unknown/514097"]"REQUIRES: Visual Studio 2017, .NET Framework 4.6.1" I only ask as I thought the requirement was for .NET 4.6.2 with Update 12 [/quote] Hi Stephen Holmes , As mentioned above there were significant changes in re-tooling for VS2017 over prior versions and this is one item I will ensure gets cleared up. As Jan mentions the requirements placed in the developer shell title are dynamic at each startup and "ask the sdk" what the requirements are directly from the mki files (for now). This does point to an inconsistency that I noticed and will be filing a defect for to hopefully see improved for the MSCE SDK U13 release, and hopefully some additional "lesser" public requirements vs. internal heavier ones. I will update this response once I have a defect filed. HTH, Bob

Forum Post: RE: [CE UPDATE 12 C++] DEVEV command unknown

$
0
0
Hi Jan, I agree with your assessment and I have identified a handful of minor items that I will see get corrected/improved and try to lower our public requirements further for next release and after. Thank you, Bob

Forum Post: RE: MicroStation SDK Example WPFDemo [Connect U12, Windows 10]

$
0
0
Marty, Yes, the video accurately demonstrates the issues that I am seeing with my toolbar. Thanks, Larry

Forum Post: RE: [CONNECT C++] ColumnDefinitionNode::GetFormattingOptions Needs Fixing

$
0
0
Hi Jon Summers , Development is looking into this issue further to assess what may be needed to implement it. If feasible I will reply with a defect, and either way either I or the developer will provide you an update when available. Thank you, Bob

Forum Post: RE: [V8i C++] Getting the Visible Edges setting for a reference file

$
0
0
HI Piers Have you found any solution for this issue ? I'm looking for a way to set the display style of a reference.

Forum Post: While placing 'Orthogonal Shape' how to know shape created or not in Microstation V8 2004

$
0
0
OS: Windows 7 Microstation Version: V8 2004 Language: English While placing 'Orthogonal Shape' how to know shape created or not in Microstation V8 2004 because it is getting created with accept button(mouse left click), the thing is, I want to attach 'tag set' from VBA userform to created 'Orthogonal Shape', how to achieve this in VBA? Below is the snapshot of created Ortho shape with ‘accept button(mouse left click) and also a tried recorded macro to achieve what i want (to attach ‘tag set’ data to‘Ortho shape’ created using VBA userform) with no success Sub Macro1() Dim startPoint As Point3d Dim point As Point3d, point2 As Point3d Dim lngTemp As Long ' Coordinates are in master units startPoint.x = 263861.796958 startPoint.y = 3705781.56381 startPoint.Z = -113.024663 ' Send a data point to the current command point.x = startPoint.x point.y = startPoint.y point.Z = startPoint.Z CadInputQueue.SendDataPoint point, 1 point.x = startPoint.x point.y = startPoint.y + 34.454839 point.Z = startPoint.Z CadInputQueue.SendDataPoint point, 1 point.x = startPoint.x + 29.13 point.y = startPoint.y + 34.141613 point.Z = startPoint.Z CadInputQueue.SendDataPoint point, 1 point.x = startPoint.x + 29.13 point.y = startPoint.y + 18.793549 point.Z = startPoint.Z CadInputQueue.SendDataPoint point, 1 point.x = startPoint.x + 17.540645 point.y = startPoint.y + 18.167097 point.Z = startPoint.Z CadInputQueue.SendDataPoint point, 1 point.x = startPoint.x + 18.167097 point.y = startPoint.y - 0.313226 point.Z = startPoint.Z CadInputQueue.SendDataPoint point, 1 point.x = startPoint.x point.y = startPoint.y point.Z = startPoint.Z - 0# CadInputQueue.SendDataPoint point, 1 CommandState.StartDefaultCommand End Sub Expecting your valuable replay. Thanks and Regards, Uday B.

Forum Post: RE: [V8i C++] Getting the Visible Edges setting for a reference file

$
0
0
Hi Evan, I never ended up getting it going, but looking at the latest SDK, it looks like you can at least get the Display Style using the DisplayStyleManager API.

Forum Post: RE: While placing 'Orthogonal Shape' how to know shape created or not in Microstation V8 2004

$
0
0
[quote userid="850904" url="~/products/programming/microstation_programming/f/microstation-programming---forum/177521/while-placing-orthogonal-shape-how-to-know-shape-created-or-not-in-microstation-v8-2004"]While placing 'Orthogonal Shape' how to know shape created in Microstation V8 2004. I want to attach 'tag set' from VBA userform to created 'Orthogonal Shape'[/quote] There's no way to detect when a primitive command has completed. However, you can monitor DGN model changes using the IChangeTrackEvents Object. Write a class that Implements IChangeTrackEvents . Write code to act on the msdChangeTrackActionAdd event. Look for examples in VBA help.

Forum Post: RE: While placing 'Orthogonal Shape' how to know shape created or not in Microstation V8 2004

$
0
0
Hi Jon, Thanks for your valuable reply. Regards, Uday B.

Forum Post: [V8i C#] Changing the New tag on an element.

$
0
0
I'm looking for a way to change the new/isNew tag on an element. Is this in possible in any way? I was thinking it would be possible to do, simmilar to how you change the isAnnotation tag. But this method didn't bear any fruit. Nikolai Madsen LE34

Forum Post: RE: [V8i C#] Changing the New tag on an element.

$
0
0
[quote userid="1006514" url="~/products/programming/microstation_programming/f/microstation-programming---forum/177535/v8i-c-changing-the-new-tag-on-an-element"]I'm looking for a way to change the new/isNew tag on an element[/quote] When writing C# code for MicroStation V8 i , you're calling the VBA COM interface via an InterOp . The answer to your question is in VBA help: IsNew Property Read-only Boolean. Gets a value indicating whether this object was added since the last time that the design file's modification flags were cleared. Note that IsNew is a property; tag has a particular meaning in MicroStation (it's an element type).

Forum Post: RE: [V8i C#] Changing the New tag on an element.

$
0
0
Hi Nikolai, as Jon wrote this property (when using "development terminology") or better Element attribute "New" (using correct MicroStation user terminology), is read-only in Interop API. [quote userid="1006514" url="~/products/programming/microstation_programming/f/microstation-programming---forum/177535/v8i-c-changing-the-new-tag-on-an-element"]I was thinking it would be possible to do, simmilar to how you change the isAnnotation tag. But this method didn't bear any fruit.[/quote] Even without reading VBA documentation, Visual Studio provides clear information it's "getter only" property. No space for "thinking it would be possible" here I guess. [quote userid="1006514" url="~/products/programming/microstation_programming/f/microstation-programming---forum/177535/v8i-c-changing-the-new-tag-on-an-element"]Is this in possible in any way?[/quote] Yes, despite of I think it's not very good idea to modify the attribute, because this attribute provides defined functionality, so every time you will change it, you should be sure you follow the same rules and don't break the functionality. To change the value, I guess you can use available wrappers around mdlElement_setProperties or mdlElmdscr_setProperties. Consult MDL documentation for exact declaration of VBA wrapper, that can be used also in C# (using [DllImport("stdmdlbltin.dll")] attribute), not only in VBA. With regards, Jan

Forum Post: RE: [CONNECT C#] switch activedgnfile

$
0
0
Hi Bob, [quote userid="2163" url="~/products/programming/microstation_programming/f/microstation-programming---forum/177303/connect-c-switch-activedgnfile/513912"]could you expand this a bit to let me know what (important) differences you wish to understand and I will see what I can find out.[/quote] in my head it's clear. but not shure whether how to transform it to words ;-) It's a problem / a feature of the whole API description that we discussed already: When description exists, it's exact technically, but there are zero (well, very limited amount very close to zero) information about "usage context". And in my opinion the context explanation is far more important, especially when API is based on new aproach or functionality. It's so important to know what exactly parameters mean, it should be clear from their names or example code can be investigated, but what is newer explained is "when this specific class/method/property should be used" or "why it's used in this situation and not another class which seems to provide similar results". Two examples (because as you know I always try to provide some ;-) not from software development, but from real life: Imagine you choose a door handle for your home. When described as MicroStation API, you will quickly obtain information about used material, physical size, color and price. But what you will miss is that one handle requires heavy preasure to press it and another allows to use less pressure, but it has longer move. The feature is the same - door is not so easy (accidentally) to open, but small presure can be better for a use by children. It can be argued it's clear from the description, but you will probably not able to transform technical details like number of strings inside and length of necessary move into "use case". Another, completely different, example, is about selecting of prunning shears (last month they were my big friends ;-). When you will focus on normal issues, maybe you will miss (and it's often not clear from description) differences in construction: Some are similar to normal scissors with two blades (bypass blade style), another have one blade used agains fixed part (anvil style). This construction defines when it can be used (for a curiosity, explained here ), but you will probably not realized from the goods description, because it's more about context and relation to another goods. MicroStation API documentation is written with aim to provide precise technical and functional information. But what is more often needed in real life are information how to use and what to use. Sorry for long text, back to my question: Is there any reason why stick on old WorkDgn, when any design file should be opened in background, or it's recommended to use DgnFile object? Or asked in a different way: When DgnFile object should be used and what are limitations? With regards, Jan

Forum Post: I am trying to place 3 lines of MORSE CODE at an angle using VBA.

$
0
0
The above is what it should look like for any angle selected. The lines of text need to be rotated by selecting a line and the text is placed above the line with the text left margin aligned. I am using the Morse Code font. I can't use a TextNode because the spacing between to the lines are way to big. I can get my vba code to place the lines horizontal but I can't figure out how to place them at an angle keeping the left margin aligned and the line spacing the same. I tried using the Named Group but I can't get it to rotate in my code.

Forum Post: RE: I am trying to place 3 lines of MORSE CODE at an angle using VBA.

$
0
0
Hi, [quote userid="85815" url="~/products/programming/microstation_programming/f/microstation-programming---forum/177550/i-am-trying-to-place-3-lines-of-morse-code-at-an-angle-using-vba"]I can't use a TextNode because the spacing between to the lines are way to big.[/quote] It is not because TextNode is used, but you use wrongly defined text style, or at least line spacing value is too big. Regards, Jan

Forum Post: RE: I am trying to place 3 lines of MORSE CODE at an angle using VBA.

$
0
0
The line spacing is 0. The Text Style is showing the MORSE CODE font. Try placing some MORSE CODE text with 3 lines in a TEXTNODE. Put an A on line 1, B on line 2 and C on line 3. There will be a BIG line spacing between the letters. The line spacing is big I think because of the size of the letters. The MORSE CODE is only 1 row unlike a character which is more. Try it yourself.

Forum Post: RE: I am trying to place 3 lines of MORSE CODE at an angle using VBA.

Forum Post: RE: I am trying to place 3 lines of MORSE CODE at an angle using VBA.

$
0
0
What version (e.g. v10.x.y.z) of MicroStation, or other product, are you using? [quote userid="85815" url="~/products/programming/microstation_programming/f/microstation-programming---forum/177550/i-am-trying-to-place-3-lines-of-morse-code-at-an-angle-using-vba"]I can't get it to rotate in my code[/quote] We can't see your code. We could guess, but we'd be bound to guess wrong. Show us the code you use to place text.

Forum Post: RE: [CONNECT C#] switch activedgnfile

$
0
0
Thanks Robert, a follow up question to that is how would I then switch the active model to a different model. I can get the active model from this... DgnModel activemodel = Bentley.MstnPlatformNET.Session.Instance.GetActiveDgnModel(); but not seeing how to set the active model to a different one, been searching the docs and methods, its got to be right in front of me. I know with interop there was a .activate methods call... thanks JD

Forum Post: RE: I am trying to place 3 lines of MORSE CODE at an angle using VBA.

$
0
0
This should give you a rough idea. I tried to attached the vba macro but I couldn't figure out how to do it. Sub Main1() Dim oElement As Element Dim oElement1 As Element Dim oElement2 As Element Dim oElement3 As Element Dim oLevel As Level Dim oCadInputMsg As CadInputMessage Dim Point As Point3d Dim textString As String Dim oTextStyle As TextStyle Dim oFont As Font Dim x As Double Dim oGroup As NamedGroupElement Dim oMember As NamedGroupMember Dim rotPoint As Point3d Set oGroup = ActiveModelReference.GetNamedGroup("TextGroup") Set oTextStyle = ActiveSettings.TextStyle Set oFont = GetFontById(82) Set oTextStyle.Font = oFont oTextStyle.Height = 0.5 oTextStyle.Width = 0.5 If rotAngle = 180 Then rotAngle = 0 End If textString = UCase(inputText) Set oCadInputMsg = CadInputQueue.GetInput(msdCadInputTypeDataPoint, msdCadInputTypeReset) If oCadInputMsg.InputType = msdCadInputTypeReset Then CadInputQueue.SendReset CommandState.StartDefaultCommand Exit Sub End If Point = oCadInputMsg.Point rotPoint = Point textString = Mid(Strings.UCase(inputText), 1, 1) If IsMissing(rotAngle) Then Set oElement = CreateTextElement1(Nothing, textString, Point, Matrix3dIdentity) Else Set oElement = CreateTextElement1(Nothing, textString, Point, Matrix3dFromAxisAndRotationAngle(2, Radians(rotAngle))) End If Set oElement.AsTextElement.TextStyle = oTextStyle ActiveModelReference.AddElement oElement Debug.Print "--------------------------------------" Debug.Print "A Point X: " & Point.x Debug.Print "A Point Y: " & Point.Y Debug.Print "A RotAngle: " & rotAngle & " Radians: " & Radians(rotAngle) oGroup.AddMember oElement x = (Sin(Radians(rotAngle))) - 0.05 Point.Y = Point.Y - 0.05 '* Point.Y) Point.x = Point.x ' * Point.x) textString = Mid(Strings.UCase(inputText), 2, 1) If IsMissing(rotAngle) Then Set oElement = CreateTextElement1(Nothing, textString, Point, Matrix3dIdentity) Else Set oElement = CreateTextElement1(Nothing, textString, Point, Matrix3dFromAxisAndRotationAngle(2, Radians(rotAngle))) End If Set oElement.AsTextElement.TextStyle = oTextStyle ActiveModelReference.AddElement oElement Debug.Print "x = " & x Debug.Print "B Point X: " & Point.x Debug.Print "B Point Y: " & Point.Y Debug.Print "B RotAngle: " & rotAngle & " Radians: " & Radians(rotAngle) oElement.Redraw oGroup.AddMember oElement Point.Y = Point.Y - 0.05 '* Point.Y) Point.x = Point.x ' * Point.x) textString = Mid(Strings.UCase(inputText), 3, 1) If IsMissing(rotAngle) Then Set oElement = CreateTextElement1(Nothing, textString, Point, Matrix3dIdentity) Else Set oElement = CreateTextElement1(Nothing, textString, Point, Matrix3dFromAxisAndRotationAngle(2, Radians(rotAngle))) End If Set oElement.AsTextElement.TextStyle = oTextStyle ActiveModelReference.AddElement oElement Debug.Print "x = " & x Debug.Print "C Point X: " & Point.x Debug.Print "C Point Y: " & Point.Y Debug.Print "C RotAngle: " & rotAngle & " Radians: " & Radians(rotAngle) ' oElement.Redraw oGroup.AddMember oElement Debug.Print "--------------------------------------" ActiveSettings.GraphicGroupLockEnabled = True oGroup.Rewrite oGroup.RotateAboutZ rotPoint, Radians(30) oGroup.Redraw CadInputQueue.SendReset CommandState.StartDefaultCommand End Sub
Viewing all 25671 articles
Browse latest View live


Latest Images

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