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

[V8i MDL] How to trigger line length parameter

$
0
0

Hi.

I have an old MDL program that is used to replace text. I use mdlModify_elementSingle() to find the texts strings. If the text is part of text node with the line length parameter set the numer of row in the text node are not updated if the new text is longer than text length. If I use the command "Change Text Attributes" with nothing set the text node will be updated with new lines. How can I trigger this from MDL?

Regards,

Krister


mdlParams_getActive( )

$
0
0

I'm calling mdlParams_getActive( ) to get the active color, etc. I know if the value is -1 than it's the assigned ByLevel color. What I need however is the actual color, line style,and weight. Ideas? As always, many, many thanks in advance.

 

D

[V8i C++] Tool Cleanup and Unloading

$
0
0

As more and more of our custom tools are used, the list of loaded MDL apps grows quit large, as most of them are CmdItemListRsc tools. Is there any way to unload these automatically? For example, when a user "jumps" from command "A" to "B", can "A" be automatically unloaded? I know there are "cleanup" states that can be triggered, but it seems those perform a "cleanup" upon tool restart. Is there any that that cen be used to trap when a different .ma CmdItemListRsc is called? I don't want to unload if the current command is just being restarted. Some type on "OnNewTool()"?

 

Thanks,

Bruce

[V8i VBA] ShapeElement.Normal Property

$
0
0

The result of VBA  ShapeElement.Normal property is incorrect in a 2D model.  Both clockwise and counter-clockwise shape elements have  the same normal.

I placed two shapes in a 2D DGN model, then reversed one of them.  On checking the value of the normal of each ShapeElement, the result is 0,0,1 in both cases.

I expected the clockwise shape to have value 0,0,-1.  Is my expectation misplaced?

If I place two similar shapes in a 3D model then the normal of the clockwise shape is what I expect.

How to make element selection smarter?

$
0
0

I have got a VBA program that is designed for placing element along walls.

If you start the program and move the cursor along the edges of a wall a rectangle is shown. If you click on the left mouse button the element is placed.

I use ILocateCommandEvents to check if AccuSnap has catched a wall or not. If it did not catch a wall then the rectangle is not shown.

Everything is running fine so far - there is just a little unattractive side effect when I come to the corner of 2 walls.

The video below shows what I mean:

(Please visit the site to view this media)

The issue seems to be caused because the snapped point lies on both walls. My code checks the IDs of the located elements and in corners it catches the IDs of both walls which leads to the effect shown in the video.

Below you can find the code:


Private Sub ILocateCommandEvents_Dynamics(Point As Point3d, ByVal view As view, ByVal drawMode As MsdDrawingMode)
        
Dim ele As Element
Dim eleComponent As Element
Dim ele_checkComponent As Element
Dim IDcheck As Long
           
Set ele = CommandState.LocateElement(Point, view, True)

Do While Not ele Is Nothing

  If ele.IsComplexElement Then
 
   Set eleComponent = CommandState.GetLocatedElement(False)

     If eleComponent.IsLineElement = True And (eleComponent.Level.name = "SM2D_WANDINNEN- UND -AUSSENKANTEN" _
     Or eleComponent.Level.name = "SM2D_WÄNDE-BRÜSTUNGEN") Then
     
       dAngle = GetActiveAngleFrom2Points(eleComponent.AsLineElement.StartPoint, eleComponent.AsLineElement.EndPoint, view)
       
     End If
 
  Else
 
    If ele.Level.name = "SM2D_ELEKTRO_PLATZIERUNGSRAHMEN" Then
    
      Set eleComponent = CommandState.GetLocatedElement(True)
      If eleComponent.Type = msdElementTypeShape Then
        dAngle = GetActiveAngleFrom2Points(eleComponent.AsShapeElement.Vertex(1), eleComponent.AsShapeElement.Vertex(2), view)
        If Point3dEqualTolerance(Point, eleComponent.AsShapeElement.Vertex(1), 1) = True Then
          myElement.color = 2
        Else
          myElement.color = 0
        End If
        
      End If
      
    
    End If
    
  End If
 
  IDcheck = eleComponent.ID.Low
 
  Set ele = CommandState.LocateElement(Point, view, False)

  If IDcheck <> IDcheck2 And IDcheck <> 0 And (eleComponent.Level.name = "SM2D_WANDINNEN- UND -AUSSENKANTEN" _
  Or eleComponent.Level.name = "SM2D_WÄNDE-BRÜSTUNGEN" Or eleComponent.Level.name = "SM2D_ELEKTRO_PLATZIERUNGSRAHMEN") Then
    
    If dAngle <> rotate_angle Then
      myElement.Rotate Point, 0, 0, Radians(-rotate_angle)
      myElement.Rotate Point, 0, 0, Radians(dAngle)
      rotate_angle = dAngle
    End If
    
    IDcheck2 = IDcheck

  End If
 
  If eleComponent.Level.name = "SM2D_WANDINNEN- UND -AUSSENKANTEN" _
  Or eleComponent.Level.name = "SM2D_WÄNDE-BRÜSTUNGEN" Or eleComponent.Level.name = "SM2D_ELEKTRO_PLATZIERUNGSRAHMEN" Then
    
    offset = Point3dSubtract(Point, myElement.Vertex(1))
    myElement.Move offset
    myElement.Redraw drawMode
    
  End If
 
Loop

End Sub


Does anyone have an idea how to remove the horizontal rectangle? Only the vertical one should be displayed!

mdlTransients_* - interfering with fit view

$
0
0

Hi all,

    In my app I'm updating from V7 -> V8 there is a guide drawn around the edge of the window from which the user user can work out where they are, picture a blue border, 50-60 pixels wide drawn around the edge of the display with lat/lon written on it. This border does not change size, depending upon the amount of zoom employed, it is always the 50-60 pixels.

    This used to be achieved by just creating an appropriate sized shape and then calling mdlElement_draw() . The function containing this this was controlled by an mdlView_setFunction(UPDATE_POST, ....) command. Now in the brave new world of V8, this no longer works and I'm using Transients. A couple of hours of work, some googling etc and everything is fine except for one thing, fit to view.

    In the old method, the shape that was drawn was not taken into account when the internals of MS did the calc's for the fit. The data would show up nicely, the longest horizontal element would be about 95% of the width of the display. Now, it appears that MS is taking into account the transients hence when fit view is called the first time, everything is fine. When it is called the second time, the extents of the transients appear to be taken and the scaling based upon this. This results in the normal elements being scaled 95%, but the border is still drawn at the edge of the screen. Call fit view a few times and the normal elements, the data the user is interested in, shrinks and shrinks with each call.

    Is there a way that the fit view scaling can be told to ignore the transients?

Any thoughts, greatly appreciated,

       Andrew

p.s. If this is making no sense, let me know and I can do some screen grabs

Running a VBA from a autorunning VBA?

$
0
0

I am auto-running a VBA programme on every file open using clsDGNOpenClose (AskInga), this is checking what file extension is being used and then running another VBA based on one of two file types. (This is to set the level colours in V7 as we are forced by a client to continue to work in this restrictive version).

The automation is working in my tests but for the second VBA to function (setting the level colours) the Level Manager Dialog needs to be open - I am using CadInputQueue.SendCommand "Levelmanager dialog open" however, when it opens it is not displaying any levels until I manually select the filename in the tree list.

When I run the keyin the manually outside of VBA the file is auto highlighted and the levels displayed, I have also tried running just the keyin from a simple VBA module and it works.

It seems to be something to do with the clsDGNOpenClose class but I don't fully understand how the class is controlled.

I hope you may have some suggestions on how to resolve this.

Here is the main chunk of my code:

 

Private Sub m_OpenCloseHooks_OnDesignFileOpened(ByVal DesignFileName As String)
     
    
    'Define variables
    CadInputQueue.SendCommand "Levelmanager dialog open"
   
    Dim DgnFileName As String
Dim DgnFileName1 As String
    With ActiveWorkspace
     
        DgnFileName = ActiveDesignFile.Name
        
Dim pos As Integer

DgnFileName1 = ActiveDesignFile.Name
pos = InStrRev(DgnFileName, ".")
If pos > 0 Then
DgnFileName1 = Left(DgnFileName, pos - 1)
End If
       
Debug.Print "DgnFileName= "; DgnFileName
Debug.Print "DgnFileName1= "; DgnFileName1

Dim MyNote As String
Dim MyNote1 As String
Dim Answer As String

    'Place your text here
    MyNote = "Your file is:" & Chr(13) & Chr(13) & DgnFileName1 + (".lay")
    MyNote1 = "Your file is:" & Chr(13) & Chr(13) & DgnFileName1 + (".ach")
   
If DgnFileName = DgnFileName1 + (".lay") Then

LayModule

       
        Else
       
        Debug.Print "not ACH file"
       
If DgnFileName = DgnFileName1 + (".ach") Then

ArchModule
        
        Debug.Print "not LAY file"
       
      End If
      End If
     
      End With

Need help with OLD UCM variables in a Basic Macro--V8i-SS2 80.11.07.492

$
0
0

I have an old UCM I've modified to run as a Basic file and many others as a single command. The file completely draws the Plan & Elevation of bridges using LVC, grades, PVI sta, PVI elev, length of VC (can have multiple PVI sta-els too), gutter to gutter, skew angle, left, 90 or right, end cap, beam slab depth, wingwall and endpost length, No. of bents, pile or concrete, Intermediate  Bent caps width & depth, then lets you set a scale, .0083-1/0, .0056-1/15, .0042-1/20, .0028-1/30, .0017-1/50. This UCM (converted to basic then calls 8+ other UCM's (also converted to basic) - they are called based on the scale of the output. They also dimension and place notes about the bridge P&E on all parts of the design. We have used this for years in V7 - works great for everything we design here at GDOT. The programs use Screen Tutorials too, so I've tried to get all this out and working in macros. I designed a multipage VBA "frm" that lets the user input the information and I call the macros using CadInputQueue.SendCommand "macro ????" I'm new at VBA so I'm not sure how to get the input from each of the fields to store in the variables(Dim) being used "publicly" shared by all the other basic programs (HELP) I can send the files if anyone is interested in seeing what I have so far...I also don't no how to build a list of Bent Sta and Elevations on the last page of the form.

My question is several TCB type variables did not port and they are critical because they stored values used in the drawing of the P&E. The variables are, UCINT(), ADPDFO(1418)this is my bent counter , ADPREF(1181)(not critical), ADRES2(1180)(not critical), not sure if CDbl(?(?)(this stores scale value) is working as I want it to? We are using Working units  Format-MU, MasterUnit-US Survey Feet, Sub Units-US Survey Inch, Accuracy-0.1234, the values in the User commands V7 files are Feet ', Inches", 12 per', 1000".at values do I use for the multiplier in V8 macro?

We have LEAP and I tried to reproduce, but there is not enough detail. I can't use our own fonts and the file is Metric. the Bridge Design people don't like that. If LEAP

could be more open so we could modify and add our "flavor" to it, they would consider using it. I did give them a demo and we discussed this issue. Some of the ways it details steel and strands don't match our standards either.

Thanks - Joe

 


Dynamic Display of Elements

$
0
0

Dear Freinds,

I am working on mdl using c programming on V8.05 (V8) and V8.11 (V8i).

For dynamic display elements mdlElmdscr_display (V8) is used. But it is deprecated in V8i.

So, i am using mdlTransient_xxx functions using. My code snippet is like below

Case 1:  ------ unable to get the dynamic display (using global transient element)

intSuccess = mdlElmdscr_createFromVertices (&msedNewElmP, &msedElmP->el, dpModfyPts, intNumPoints, FALSE, 0);

if (SUCCESS == intSuccess)
{
 
 
 if (myTransient)
 {
  //mdlTransient_free (&myTransient, FALSE);
  myTransient = mdlTransient_replaceElemDescr ( myTransient, msedNewElmP, FALSE, 0x00ff, NORMALDRAW, FALSE, FALSE, FALSE );
 }
 else
 {
  myTransient = mdlTransient_addElemDescr ( NULL, msedNewElmP, FALSE, 0x00ff, NORMALDRAW, FALSE, FALSE, FALSE );
  //myTransient = mdlTransient_addElemDescr ( myTransient, msedNewElmP, FALSE, 0x00ff, HILITE, FALSE, FALSE, TRUE );
  //myTransient = mdlTransient_addElement( myTransient, &msedNewElmP->el, FALSE, 0x00ff, HILITE, FALSE, FALSE, TRUE );

 }
}

Case 2:  ------ Overlapiing the elements (displaying more elements) until accepting a point (using local transient element)

intSuccess = mdlElmdscr_createFromVertices (&msedNewElmP, &msedElmP->el, dpModfyPts, intNumPoints, FALSE, 0);

if (SUCCESS == intSuccess)
{
 
 TransDescrP  myTransient = NULL;


 //mdlElmdscr_display (msedNewElmP, elmDetailsP->dgnModelRef, NORMALDRAW);

 //mdlDynamic_setElmDescr(msedNewElmP); 
 
 myTransient =  (TransDescrP) mdlTransient_addElemDescr ( NULL, msedNewElmP, FALSE, 0x00ff, NORMALDRAW, FALSE, FALSE, FALSE );
 //mdlTransient_eraseDisplay(myTransient,TRUE);

 //if (myTransient) mdlTransient_setViewFlags(myTransient, 0xFFFF, TRUE);
 
 //mdlTransient_normalDisplay (myTransient);
 mdlTransient_free (&myTransient, FALSE);

Please how can i go through this. I need this mdl for both versions (V8 & V8i). 

Thanks..,

detect if level exist and create it (vba 8.05)

$
0
0

my little contribution

Dim Mylevel As Level
Dim Olevel As Level
Dim StatusLevel As Boolean
Dim NameLvl As String
NameLvl = "Materiel AEP existant"
StatusLevel = False
For Each Mylevel In ActiveDesignFile.Levels
  If Mylevel.Name = NameLvl Then StatusLevel = True
Next Mylevel
 If StatusLevel = True Then
 ActiveSettings.Level = ActiveDesignFile.Levels(NameLvl)
 Else
 Set Olevel = ActiveDesignFile.AddNewLevel(NameLvl)
 ActiveSettings.Level = ActiveDesignFile.Levels(NameLvl)
 End If

mke error (toolsubs.dlo)

$
0
0

Dear All,

While converting v8 mdl code to v8i mdl code I encounter this error as shown in the attached screenshot. As per documentation I have created the environ.variable

MLINK_STDLIB:

C:\Program Files\Bentley\MicroStation V8i (SELECTseries 1)\MicroStation\mdl\library\builtin.dlo;C:\Program Files\Bentley\MicroStation V8i (SELECTseries 1)\MicroStation\mdl\library\BentleyDgn.dlo;C:\Program Files\Bentley\MicroStation V8i (SELECTseries 1)\MicroStation\mdl\library\toolsubs.dlo

Kindly help me to fix this issue

Get Element Area Between the 3 Points ( Microstation V8 Using MDL Language)

$
0
0

Dear Guys,

In Attached Image You can See the LineString Feature with 3 points on it.

Green indicates Start Point.

Orange indicates Mid Point.

Red Indicates End Point.

1) I just want the area between the start and end point.

2) with the number of vertices between the start point and end point.

For Cross Check purpose is it possible to get the area between the points using any function?

mdlView_updateSingle returning MDLERR_USERABORT (-144)

$
0
0

Can someone tell me why mdlView_updateSingle is returning MDLERR_USERABORT (-144)? That is even if the update takes place OK.

Updating MSElementDescr

$
0
0

I have an MSElementDescr which contains an int. After placing my MSElementDescr, I'm incremented the int. Is there an easier way to update the MSElementDescr without having to walk each element until I find the int and replace it with the new value? As always, many, many thanks in advance.

D

SS3 toolsettings dialog cannot be adjusted

$
0
0

Hi to all,

the SS3 toolsettings dialog appears much too big - and cannot be adjusted.

Even every start primitive command (while toolsettings is opened) leads to a wider Dialog. Simply clicking the same toolbox-Icon twice let the toolsettings Dialog grow. This differs from SS2.

The following function has no effect in SS3 (but worked in SS2 perfectly):

 

__declspec (dllexport) int divutilsSetToolSettingsWidth(double width)
{
   DialogBox *db=NULL;
   BSIRect    rect;
   Point2d    pNewpos;

   memset(&rect,   0,sizeof(BSIRect));
   memset(&pNewpos,0,sizeof(Point2d));

   /* Toolsettingsdialog anpassen */
   if((db=mdlDialog_getToolSettings())!=(DialogBox*)NULL){

       if(SUCCESS!=mdlWindow_globalRectGetGlobal(&rect,(MSWindow*)db))
          return(FALSE);

       pNewpos.x= (long)width;
       pNewpos.y= (long)(rect.corner.y - rect.origin.y);

       mdlWindow_resize((MSWindow*)db,CORNER_LOWERRIGHT,&pNewpos);
      
       if(mdlWindow_isMinimized((MSWindow*)db))
         return(TRUE);

      if(mdlWindow_isDisplayed((MSWindow*)db)){
         mdlWindow_flush((MSWindow*)db);
         mdlWindow_show((MSWindow*)db,FALSE);
      }
      mdlDialog_adjustPopDownHeight(db);
      return(TRUE);
   }
   return(FALSE);
}

here is an example:

1. at start of the function - the toolsettings is already 2 cm wider than the resources and the mdlWindow_resize() function define:

 

 

2. after clicking the same toolbox-Icon 2,3 times the Dialog becomes bigger and bigger:

 

Kind regards,

Willi


Getting selected subelement in Cell

$
0
0

I can get the selected elements in a dgn by using GetSelectedElements.

What I want is, when the user selects a cell, then in the Element Information treeview, selects a subelement of that cell, how do I get that element.

I can see that MicroStation will "highlight" that element on the display and show the element information in the user interface, but I can't seem to be able to get that Element programatically.

I'm doing this is C#, but I can translate VBA to C#. I just need to know the objects and methods.

Any help is appreciated!

-bert

 

[V8i BASIC] Text spacing settings

$
0
0

We are using MicroStation V8i (SELECTseries 3) version 08.11.09.292 and we have noticed that when we use our macros to specify certain text settings, line spacing and inter-character spacing, are not being entered correctly. For instance, if I enter LS=8.0, the line spacing that is entered into the Place Text window comes back as .625000. From what I can tell, MicroStation has to be dividing the line spacing command by the text height. Inter-character spacing is doing the same thing; dividing the ICS by the text height to get .075000.

Here is a copy of one of my macros:

        MbeSendKeyIn "lv=13"

MbeSendKeyIn "ft=62"

MbeSendKeyIn "lc=0"

MbeSendKeyIn "th=12.80"

MbeSendKeyIn "tw=12.00"

MbeSendKeyIn "wt=0"

MbeSendKeyIn "co=0"

MbeSendKeyIn "ls=8.0"

MbeSendKeyIn "active txcharspace=.96"

MbeSendKeyin "active txj cb"

The annotation scale within model properties is set to 1:1. Is there a configuration variable or setting that would need to be modified that would set MicroStation to not to do this? 

problems with Terrascan

$
0
0

Hi,

I have a problem with terrascan, when I use terrascan, in the tools menu I can not find macros.

I've been looking into several sources and did not find the answer.

I hope I will get the answer here.

Thank you for your attention.

mdlRaster_fileExport Error

$
0
0

Hi all!

I am having a problem when using the above function. I found a thread from a few years ago that was similar but I haven't been able to get past this. When the code hits mdlRaster_fileExport, I get a System FaultL: 5.

Here is my code;

 long  imageType = IMAGEFILE_CIT;
 long  nImageTypeListHandle;
 long  nImageTypeIterator;
 long  ncolorModeIterator;
 long  ncompressModeIterator;
 RasterExtendedInfo       rasterExtendedInfo;
 int  status;
 DgnRasterP rasterHandle;
 StatusInt exportStatus;


 status=mdlRaster_fileOpen(&rasterHandle,tifFile,mdlModelRef_getActive(),FILE_ACCESSMODE_READ | FILE_ACCESSMODE_CREATE ,EVENT_UPDATE);
 if(status==SUCCESS)
 {
  mdlRaster_extendedInfoGet(&rasterExtendedInfo,rasterHandle);
   rasterExtendedInfo.attachMode=ATTACH_REFERENCE;
  mdlRaster_extendedInfoSet(&rasterExtendedInfo,rasterHandle,EVENT_SILENT);
  /* get the list of supported image format */
  nImageTypeListHandle = mdlRaster_fileFormatTypesGet ();
  /* get an iterator on file format */
  nImageTypeIterator = mdlCntr_mapIteratorCreate (&imageType, nImageTypeListHandle);
  /* get an iterator on supported color mode */
  ncolorModeIterator =  mdlRaster_fileFormatSupportedColorModesGet   (FILE_ACCESSMODE_CREATE,COLORMODE_MONOCHROME);
  /* get an iterator on compression mode*/
  ncompressModeIterator = mdlRaster_fileFormatSupportedCompressionModesGet  (FILE_ACCESSMODE_CREATE , imageType,  COMPRESSTYPE_CCITTFAX4);
  exportStatus=mdlRaster_fileExport( citFile,     /*const char * filename, */
        nImageTypeIterator,  /*long fileTypeItor, */
        GEOREF_SISTERFILE_NONE, /*int sisterFile, */
        ncolorModeIterator,  /*long colorModeItor, */
        NULL,      /*unsigned maxColor, */
        ncompressModeIterator, /*long compressModeItor,*/
        0,      /*unsigned char compressionLevel,*/
        TILE_NO,     /*int tile, */
        1.0,      /*double gamma, */
        FALSE,      /*int invert, */
        FALSE,      /*int resize, */
        NULL,      /*Dpoint2d * newSize, */
        NULL,      /*RasterGeotiffInfo * geotiffInfo, */
        FALSE,      /*int resample, */
        rasterHandle);
 }

I have checked that all of the parameters appear to be valid and correct. I have no idea what I am doing wrong.

Any assistance is greatly appreciated!

Thanks!

Mike

Problem while read level from element

$
0
0

Dear All,

I am upgrading the MDL to V8i version , I have 2 function one is SearchReadDGN and another one is searchValidElem(to check the symbology of the elements). When using this function mdlLevel_getName (highlighted ) the tool throws system 5 error when I comment those 3 lines there is no issue. Could your please clarify what I am doing wrong in that lines.


searchReadDgn function
-------------------------
for (i = 0; i < numAddr; i++)
        {        
            if (mdlElmdscr_read (&elem, currAddrT[i], dgnModelActive, FALSE, &realPos) != 0)
            {
                cmpElem ++;
                if ( elem )
                {
                    percent = ((cmpElem * 100) / nbrElem) + 1;
                    if(percent > 100)
                    {
                        percent = 100;
                    }
                    mdlDialog_completionBarUpdate( dialogBoxPtr, NULL, percent );

                        if( elem->h.isHeader )
                        {
                            mdlElement_getProperties(&lv,NULL,NULL,NULL,NULL,NULL,NULL,NULL,&elem->h.firstElem->el);
                        }
                        else
                        {
                            mdlElement_getProperties(&lv,NULL,NULL,NULL,NULL,NULL,NULL,NULL,&elem->el);
                        }
                       //creating issue
                        mdlLevel_getName (sLvlName, sizeof(sLvlName), dgnModelActive, lv);
                        memset (lvlName, 0, sizeof (lvlName));
                        wcstombs (lvlName, sLvlName, sizeof(sLvlName));
                        mdlDialog_openInfoBox(lvlName);
                        ///
                    if(searchValidElem(elem,currAddrT[0]) == SUCCESS)
                    {                    
                        vecTrv[selInt.nbrInVecTrv] = currAddrT[i];
                        selInt.nbrInVecTrv ++;
                        printf("dd-%lu,%d\n",currAddrT[i],i);
                    }
                    if( elem )
                    {
                        mdlElmdscr_freeAll( &elem );
                        elem = NULL;
                    }
                }
            }
        }

searchValidElem function
----------------------

Private int searchValidElem(MSElementDescr *rec_elem, ULong rec_filePos)
{
    int type;
    UInt32 lv;
    
    ULong co,wt;
    long st;
    ULong lvOut;
    UInt32 gg = 0;
    ULong msLink = 0;
    char  tableName[100];
    int   dasType;
     char temp[100];
     MSWChar sLvlName[500];
     char lvlName[250];
     
    
     
    if(rec_elem->el.hdr.dhdr.props.b.invisible != 0)
    {
        return(ERROR);
    }
    type = mdlElement_getType(&rec_elem->el);
    lmGetLinkInfoByElem(rec_elem, rec_filePos, &msLink, tableName, &dasType );
    if( rec_elem->h.isHeader )
    {
        mdlElement_getProperties(&lv,NULL,NULL,NULL,NULL,NULL,NULL,NULL,&rec_elem->h.firstElem->el);
        
        
    }
    else
    {
        mdlElement_getProperties(&lv,NULL,NULL,NULL,NULL,NULL,NULL,NULL,&rec_elem->el);
        
        
    }
    mdlElement_getSymbology(&co,&wt,&st,&rec_elem->el);
    mdlElement_getProperties(NULL,&gg,NULL,NULL,NULL,NULL,NULL,NULL,&rec_elem->el);
    
    
    
    mdlLevel_getCode( &lvOut , NULL , lv);
    lv = lvOut;
    sprintf(temp,"%lu",  lv);
    
    
    if(selInt.seds.singleValid == TVALID_ALL)
    {
        
        if(((selInt.seds.togType != FALSE)&&(type == selInt.seds.type))||(selInt.seds.togType == FALSE))
        {

            if(((selInt.seds.togLevel != FALSE)&&(selInt.lvVec[lv] == TRUE))||(selInt.seds.togLevel == FALSE))
            {

                if(((selInt.seds.togColor != FALSE)&&(co == selInt.seds.color))||(selInt.seds.togColor == FALSE))
                {

                    if(((selInt.seds.togStyle != FALSE)&&(st == selInt.seds.style))||(selInt.seds.togStyle == FALSE))
                    {

                        if(((selInt.seds.togWeight != FALSE)&&(wt == selInt.seds.weight))||(selInt.seds.togWeight == FALSE))
                        {
                        
                            if(((selInt.seds.togGG != FALSE)&&(selInt.ggVec[gg] == TRUE))||(selInt.seds.togGG == FALSE))
                            {
                                if(((selInt.seds.togMslink != FALSE)&&(selInt.msLinkVec[msLink] == TRUE))||(selInt.seds.togMslink == FALSE))
                                {
                                
                                    if(((selInt.seds.togCustom != FALSE)&&(searchValidCustom(rec_elem, rec_filePos) == SUCCESS))||(selInt.seds.togCustom == FALSE))
                                    {
                                    
                                        if((((selInt.seds.type == 2)||(selInt.seds.type == 17))&&(searchValidCellText(rec_elem, rec_filePos) == SUCCESS))||((selInt.seds.type != 2)&&(selInt.seds.type != 17)))
                                        {
                                    
                                            return(SUCCESS);
                                        }
                                        else if(selInt.seds.togType == FALSE)
                                        {
                                        
                                            return(SUCCESS);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    else if(selInt.seds.singleValid == TVALID_TYPE)
    {
        if(type == selInt.seds.type)
        {
            if((((selInt.seds.type == 2)||(selInt.seds.type == 17))&&(searchValidCellText(rec_elem, rec_filePos) == SUCCESS))||((selInt.seds.type != 2)&&(selInt.seds.type != 17)))
            {
                return(SUCCESS);
            }
        }
    }
    else if(selInt.seds.singleValid == TVALID_LEVEL)
    {
        if(selInt.lvVec[lv] == TRUE)
        {
            return(SUCCESS);
        }
    }
    else if(selInt.seds.singleValid == TVALID_COLOR)
    {
        if(co == selInt.seds.color)
        {
            return(SUCCESS);
        }
    }
    else if(selInt.seds.singleValid == TVALID_STYLE)
    {
        if(st == selInt.seds.style)
        {
            return(SUCCESS);
        }
    }
    else if(selInt.seds.singleValid == TVALID_WEIGHT)
    {
        if(wt == selInt.seds.weight)
        {
            return(SUCCESS);
        }
    }
    else if(selInt.seds.singleValid == TVALID_GG)
    {
        if(selInt.ggVec[gg] == TRUE)
        {
            return(SUCCESS);
        }
    }
    else if(selInt.seds.singleValid == TVALID_MSLINK)
    {
        if(selInt.msLinkVec[msLink] == TRUE)
        {
            return(SUCCESS);
        }
    }
    else if(selInt.seds.singleValid == TVALID_CUSTOM)
    {
        if(searchValidCustom(rec_elem, rec_filePos) == SUCCESS)
        {
            return(SUCCESS);
        }
    }
    
    return(ERROR);
}

Viewing all 383 articles
Browse latest View live


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