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

[V8i] Strange error message from BMAKE process that *was* working

$
0
0

I'm experiencing a BMAKE error all of a sudden. Things were fine, then one time when I went to run BMAKE I got (and continue to get):

 

Bentley.Make.ArgumentException : ~task arguments must begin with -i: for inputs or -o: for outputs. See Issues)\srs_isoRadialDim_MDL\Mdl.mke. You are missing the leading '-'.
1>Bentley Systems Make Utility. Version 08.11.09.02, Jan  5 2010
1>Mon Jul 08 14:36:15 2013
1>Mon Jul 08 14:36:15 2013, elapsed time: 0:00
1>BMAKE: call trace
1>    line:  122, D:\PROGRA~1\Bentley\MICROS~1\MICROS~1\/mdl/include/DeterminePolicyFile.mki
1>    line:   63, D:\PROGRA~1\Bentley\MICROS~1\MICROS~1\/mdl/include/ConfigurePolicy.mki
1>    line:   28, D:\PROGRA~1\Bentley\MICROS~1\MICROS~1\/mdl/include/mdl.mki
1>    line:   27, z:\source_code\srs_8i_nativeCode\SS3\SS3_VS2005\Iso\srs_isoRadialDim(ArrowHead Issues)\srs_isoRadialDim_MDL\Mdl.mke
1>Project : error PRJ0002 : Error result 1 returned from 'C:\Windows\SysWow64\cmd.exe'.
1>Build log was saved at "file://z:\source_code\srs_8i_nativeCode\SS3\SS3_VS2005\Iso\srs_isoRadialDim(ArrowHead Issues)\srs_isoRadialDim_MDL\Release\BuildLog.htm"
1>MDL - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 

Strange thing is - I haven't exited VS2005. It just started to do this. I've looked at mdl.mki, ConfigurePolicy.mki, and ConfigurePolicyFile.mki, but it's far from clear 1) what's going on; 2) why it's happening all of a sudden, and 3) how to fix it.

 

I run BMAKE from a batch file ( below is the "meat" of the file ):

 

REM Provide required values for bmake layered build policy machinery.
set USE_LAYERED_POLICY=1
set PolicyFileNamesMki=$(MSMDE)mdl/include/MdlSdkPolicyFileNames.mki
set PolicyFileMapMki=$(MSMDE)mdl/include/MdlSdkPolicyFileMap.mki

set BMAKE_OPT=-I%mdltools%mdl\include
set PATH=%MS%;%mdltools%mdl\bin\;%PATH%
set MLINK_STDLIB=%mdltools%mdl\library\builtin.dlo %mdltools%mdl\library\BentleyDgn.dlo %mdltools%mdl\library\toolsubs.dlo

bmake -a Mdl.mke -dNO_COMPILERS_MKI -dBUILD_USING_NoToolset

 

And I use a standard template for my .mke and .mki files. Here is the .mke file:

 

appName  = srs_isoRadialDim_mdl


#-----------------------------------------------------
# bring in default rules for creating .rsc, .mo, etc files
#-----------------------------------------------------
###%include mdl.mki

privateInc = $(baseDir)
langSpec   = $(baseDir)english/


%if defined (MSJ)
 # Create a macro for portable library extensions.
 libraryExt = dlo
%else
 libraryExt = ml
%endif


#------------------------------------------------------------------------
# mdl.mki contains the default rules for creating .rsc, .mo, etc files
#------------------------------------------------------------------------
%ifdef BSI
%include $(MS)/mdl/include/publish/mdl.mki
%else
%include $(MS)/mdl/include/mdl.mki
%endif

#-----------------------------------------------------
# define macros for files in our link and resource maps
#-----------------------------------------------------
Objs = \
  $(o)$(appName).mo \

# $(mdlLibs)ditemlib.$(libraryExt)\


Rscs = \
  $(o)$(appName)Cmd.rsc \


#-----------------------------------------------------
# generate command table include resource file using rcomp
#-----------------------------------------------------
$(baseDir)$(appName)cmd.h : $(baseDir)$(appName)cmd.r

$(o)$(appName)cmd.rsc     : $(baseDir)$(appName)cmd.r

dlmObjs     = $(baseDir)$(dllName)$(oext)


#----------------------------------------------------------------------
# The following section generates the MDL Intermediate module using
# rlib. This module contains the MDL CODE module and any
# non-translatable resource modules.
#----------------------------------------------------------------------
$(o)$(appName).mi          : $(Rscs)
        $(msg)
        > $(o)temp.cmd
        -o$@
        $(Rscs)
        <
        $(RlibCmd) @$(o)temp.cmd

#        ~time

#----------------------------------------------------------------------
# The last step to this makefile is to include the MANDATORY makefile
# used to compile the translatable resources and create the final
# MDL application. This file is typically located in the directory
# pointed to by the 'baseDir' macro defined by the user at the top
# of this file. The standard extension for this included makefile is
# '.mki' and the file is distributed as part of the Foreign Language
# Translation Kit.
#----------------------------------------------------------------------

%include $(baseDir)$(appName).mki

 

I just create the resources in the BMAKE file, and use VS2005 compiler for the DLL part. I've cleared out the temporary files and even tried to re-create the .bat, .mke, and .mki files from another project. I can open up another project, and the MDL part compiles fine....

 

I'm going to exit VS2005, and reboot the PC, but why this happens now on just one project has me baffled.

 

Bruce


Turn Levels On / Off in Nested References

$
0
0

Hi
there,

I am trying to create a macro that helps me filter out levels required for nested
references.

When
I use the keyins:

Reference levels off.

I am prompted for what levels.

I provide the level (level1)

I am prompted – select  reference

I click on the reference

I am prompted – select view

I click or type what view and NOTHING.

 

I have tried all of these:

set levels on/off "level name";selview 1
reference levels on/off "level name" *.*;selview 1

 

and everything here: http://communities.bentley.com/products/microstation/b/microstation_blog/archive/2010/12/17/key-ins-to-switch-levels-on-off-in-a-master-file-and-nested-references.aspx

 Please advise

 

MFC modeless dialog show tooltips in Native Code Project

$
0
0

.hello,

        I have a question on MFC message transfer to mstn project. Thank you for your listening and helping in advance.

        I write a MFC modeless dialog dll, I want to call it in a mstn project. The dialog have tooltips. If I use model dialog, it shows tooltips well. But I use modeless dialog, it can't call the function "PreTranslateMessage", so tooltips can't show in my MFC modeless dialog.

        The problem is the modeless dialog doesn't own the message pump. The message pump is owned by the container application.

        How can I add tooltips in my MFC modeless dailog Dll, the dll also can call by MSTN program. I think I should establish a message bridge between MFC modeless dailog and MSTN ma.

         I was wandering if the add-in Modeless dialog can help me. I try to add the CDialog virtual function to its inherit class CBModelessDialog, but can't pass debug. Does the CBModelessDialog support "virtual BOOL PreTranslateMessage(MSG* pMsg);" ?

         Looking forward to your great support!~ Thank you so much in advance!~   

[V8i SS2 VBA] Caption Issue

$
0
0

Hi Folks,

I am having trouble with a modified caption changing when I choose File > Copy from the MicroStation menu?

I am also encountering issues with the modified caption reverting to a default when changing between files from ProjectWise and external to ProjectWise, within the same MicroStation session.

I have configured DGN and Model event monitors, and recently am also trying the EnterIdle event. None of these are "consistently" updating the caption as desired nor preventing the default reversion from occuring.

Is there an effective mechanism for retaining a modified caption, reliably?

 

References:

Application.Caption Issue

http://communities.bentley.com/products/microstation/microstation_programming/f/19570/p/61653/150034.aspx

 VBA test if dgn checked out from ProjectWise

http://communities.bentley.com/products/microstation/microstation_programming/f/343173/p/87807/248014.aspx#248014

 

[V8i,MDL]How to hook the change of Graphic Group Lock?

$
0
0

Hi experts,

My question is as my post's title. I want to do some other settings when user  turn on or off the system's Graphic Group Lock.

TIA, Xue

Remove Elements from Selection

$
0
0
I am trying to create a selection of the specified region 
and then remove any text from the selection that has
"MATCH LINE" in its contents. Then I want to change the selected
elements class to "Construction".
Below is the code I have so far but I'm getting an error 
on the "UnselectElement" method and the element class is not updating.
Why?
Sub SelectPipeDataForClassChange()

Dim point As Point3d, point2 As Point3d

point.X = 3500
point.Y = 930
point.Z = 0

point2.X = 300
point2.Y = 1080
point2.Z = 0

CadInputQueue.SendCommand "Choose None"

CadInputQueue.SendDragPoints point2, point, 1

Dim ee As ElementEnumerator
Dim el As Element
Dim eleText As TextElement
Dim TextString As String

TextString = "MATCH LINE"

Set ee = ActiveModelReference.GetSelectedElements

Do While ee.MoveNext

If ee.Current.IsTextElement Then
Set eleText = ee.Current
TextName = eleText.text
If TextName Like TextString Then
ActiveModelReference.UnselectElement ee.Current, True
End If
Else: Set el = ee.Current
el.Class = msdElementClassConstruction

End If


Loop

End Sub

[V8i API or MDL] How do I fill the font table element?

$
0
0

This is just a subsidiary question for another thread.

How can I fill the font table element in design file?

I need to add font index for currently missing font, which could be resolved in new versions of MicroStation where it is available.

Thanks 

[V8i C++] How to get Deleted Elements in V8?

$
0
0

I have a V7 file with Deleted Elements. But those deleted elements cannot be identified insibe ModelTable->Graphics.

How to fetch those elements?


[V8 V7 C++] What is Cell Extension in V7? How to get it in V8?

$
0
0

Hi,

What is the concept of Cell Extension in V7 Files?

Is it relevant for V8 too?

[V8-VBA] Cell rotation about XYZ axes

$
0
0

Hi,

In the dgn, some cells are having rotation angle about all 3 axes X Y Z.
I want to make the rotation of cells to 0 Degree about all 3 axes.

I am trying with the below given code.
In the first execution, the rotation about Z axis is changed to 0 degree.
In the second execution, the rotation about X & Y axes is changed to 0 degree.

Anything wrong in the code or how to change the rotation about all axes to 0 degree
 in a single attempt ?
'-----------------------------------------------------------------------------------------------
Dim symbolOrg as Point3d
Dim rotMat As Matrix3d
Dim dX as Double, dY as Double, dZ as Double, pS as Double
Dim deltaToNewRotation As Double

rotMat = symbolElm.AsCellElement.Rotation
symbolOrg = symbolElm.AsCellElement.Origin

Matrix3dIsXRotationYRotationZRotationScale rotMat, dX, dY, dZ, pS

currentRotation = mdlRMatrix_toAngle(rotMat)
deltaToNewRotation = (0 - currentRotation)

dX = 0 - dX
dY = 0 - dY

symbolElm.AsCellElement.Rotate symbolOrg, dX, dY, deltaToNewRotation
symbolElm.Rewrite
'-----------------------------------------------------------------------------------------------
Thanks
Sivag


Trouble with bmake basic error message

$
0
0

on my First attempt to build the the complete example "basic" I attemt bmake basic and the shell throws the error below this process is complicated any assistance is welcome I've installed the Microstation SDK and ran the mstndevvars.bat " 

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>cd C:\cad\Bentley\Program\MicroStation\mdl\bin

C:\cad\Bentley\Program\MicroStation\mdl\bin>mcomp basic

C:\cad\Bentley\Program\MicroStation\mdl\bin>bmake basic
Bentley Systems Make Utility. Version 08.11.00.06, Sep  5 2007
Wed Jul 10 09:15:49 2013

~mkdir \mdl\objects

~mkdir \mdl\rscobj

~mkdir \mdl\reqdobjs

[== Building \mdl\objects\basiccmd.h, (C:\cad\Bentley\Program\MicroStation\mdl\bin\basiccmd.r) ==]
\mdl\bin\rcomp @\mdl\objects\make.opt
The system cannot find the path specified.
BMAKE: call trace
    line:   56, C:\cad\Bentley\Program\MicroStation\mdl\bin\basic.mke
Wed Jul 10 09:15:50 2013, elapsed time: 0:01

C:\cad\Bentley\Program\MicroStation\mdl\bin>rcomp basic

C:\cad\Bentley\Program\MicroStation\mdl\bin>rcomp basic

C:\cad\Bentley\Program\MicroStation\mdl\bin>

Trouble with first attempt to build "basic" "A complete Example"

$
0
0

 

I attempted to run BMAKE basic and I recieved the screen output below I am completely new to MDL development and can't seem to get off on the right foot any help is appreciated.

 

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>cd C:\cad\Bentley\Program\MicroStation\mdl\bin

C:\cad\Bentley\Program\MicroStation\mdl\bin>mcomp basic

C:\cad\Bentley\Program\MicroStation\mdl\bin>bmake basic
Bentley Systems Make Utility. Version 08.11.00.06, Sep  5 2007
Wed Jul 10 09:15:49 2013

~mkdir \mdl\objects

~mkdir \mdl\rscobj

~mkdir \mdl\reqdobjs

[== Building \mdl\objects\basiccmd.h, (C:\cad\Bentley\Program\MicroStation\mdl\bin\basiccmd.r) ==]
\mdl\bin\rcomp @\mdl\objects\make.opt
The system cannot find the path specified.
BMAKE: call trace
    line:   56, C:\cad\Bentley\Program\MicroStation\mdl\bin\basic.mke
Wed Jul 10 09:15:50 2013, elapsed time: 0:01

 

FillMode of GroupHole - BsplineCurve Elements

$
0
0

I am trying to set the fillmode for GroupHole elements that are bsplinecurves, is this possible with VBA?

If so can anyone point me to a solution.

Best Regards,

John Davidson

[V8 C++ API] Difference between getIsDisplayedFlag() and getIsHiddenFlag() for Levels?

$
0
0

Also how does one define whether Element in a Level is visible or not? Does it depend on LevelOverride flags?

[v8i SS2 VBA]

$
0
0

Hi,

Can you help me how to code this in VBA?

I wanted to create a macro to function like below:

IF I have text label like this.

3/4"-ST3001-4TH
BOP. 5600

3/4"-ST3001-4TH
BOP. 5600

3/4"-ST3001-4TH
BOP. 5600

I want to delete the two duplicate text labels and output like this 3/4"-ST3001-4TH  BOP. 5600.

Can anyone help me with this one? I really need this to get fixed.

 

Thanks,

 

RJ


[V8i MDL] HelloWorld

$
0
0

May be it's a foolish question as it's just a HelloWorld Program..... However, I feel hard to compile it to *.ma even I'm studying Visual C++.

The below is the error code. (To solve the previous problems, I set VS2008Dir in the environment and added -dBuild_USING_VS2008 command)

D:\MDL\HelloWorld\HelloWorld>bmake -a -dBuild_USING_VS2008
Bentley Systems Make Utility. Version 08.11.09.02, Jan  5 2010
Fri Jul 12 14:29:17 2013
 PolicyFile = C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\include\AssertPublicMicroStationPolicy.mki

~mkdir C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\objects\
~mkdir C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\rscobj\
~mkdir C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\reqdobjs\

[== Building C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\objects\HelloWorld.rsc, (D:\MDL\HelloWorld\HelloWorld\HelloWorld.r) ==]
C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\bin\rcomp @C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\objects\make.opt
MicroStation Resource Compiler 08.11.09
Multi-byte character processing enabled

[== Building C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdlapps\HelloWorld.ma, (C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\objects\HelloWorld.rsc) ==]
C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\bin\rlib @C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\objects\make.opt
MicroStation Resource Librarian 08.11.09

[== Building C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\objects\HelloWorld.obj, (D:\MDL\HelloWorld\HelloWorld\HelloWorld.cpp) ==]
cl -IC:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\MicroStationAPI\   -IC:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\include -IC:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\include\geom -IC:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\include\shareids -GS- -fp:fast -EHc -GR -GdF -D_X86_=1 -Di386=1 -c -W3 -DWIN32 -DwinNT -MD -D_VISCXX -Gy -wd4996 -Ox -Oy- -Os -D_SECURE_SCL_THROWS=1 -D_CONVERSION_DONT_USE_THREAD_LOCALE -D_SECURE_SCL=0 -DWIN32_LEAN_AND_MEAN   -nologo -WX -MP -Zi -FdC:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\objects\objects.pdb    -EHs  -arch:SSE2  -FoC:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\objects\HelloWorld.obj D:\MDL\HelloWorld\HelloWorld\HelloWorld.cpp
HelloWorld.cpp
C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\include\basedefs.h(319) : fatal error C1083: Cannot open include file: 'cstdio': No such file or directory
Fri Jul 12 14:29:18 2013, elapsed time: 0:01
BMAKE: file [C:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdl\objects\HelloWorld.obj] may be incomplete
BMAKE: call trace
    line:   71, D:\MDL\HelloWorld\HelloWorld\HelloWorld.mke

And I always have problem on line 71 in the mke. But the line 71 is null.

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

#-----------------------------------------------------------------------------------------
# Builds any necessary CODE modules and link them to DLL
#-----------------------------------------------------------------------------------------
$(o)$(appName)$(oext)       : $(baseDir)$(appName).cpp
(LINE 71)
%include dlmlink.mki

Result of not using -a

D:\MDL\HelloWorld\HelloWorld\HelloWorld.mke(71) : error : unexpected end of file in preprocessor

Scanning Reference Files

$
0
0

I am trying to scan a drawing's reference files.

What is wrong with my code?

It returns "0 valid objects were scanned."

Sub test()

Dim references As Attachments
Dim ee As ElementEnumerator
Dim counter As Integer


Set ee = ActiveModelReference.Scan

Do While ee.MoveNext
If ee.Current.ModelReference.IsAttachment Then
counter = counter + 1
End If

Loop

MsgBox CStr(counter) & " valid objects were scanned."

End Sub

MDL Select by attributes (Display)

$
0
0

Dear All,

I want to display only certain elements in the DGN in v8i MDL .Say for example  I want to display only the elements having Level: Level44 ,Color:140,Style:4,Weight:1.

Is it possible using MDL. In other words I want same functionality as Select By Attributes in microstation(refer the attached Screenshot)

[V8i SS3 C++] MicroStationAPI compiler warning

$
0
0

When I build an app. that #includes the MicroStationAPI header I see this compiler warning...

MicroStationAPI\ElementAgenda.h(225) : warning C4244: 'return' : conversion from '__w64 int' to 'int'

A work-around to this warning is to wrap the include statement in appropriate #pragmas...

#pragma warning (push)
//    MicroStationAPI\ElementAgenda.h(225) :
//    warning C4244: 'return' : conversion from '__w64 int' to 'int'

#pragma warning (disable:4244)
#include <MicroStationAPI.h>    
#pragma warning (pop)

Read this MSDN article for more information about #pragma warning.

[v8i vba] Use of Matrix3dFromXYRotationSkewAndScale

$
0
0

Hi,

I would appreciate if somebody can give me example when  function Matrix3dFromXYRotationSkewAndScale can be used.

Thanks,

Martin

Viewing all 383 articles
Browse latest View live


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