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

Re: [v8i SS3 MDL] Managing task navigation dialog

$
0
0

I have also created a custom .dgnlib to develop my own custom task dialog. In order to see only my custom task dialog without all of the other task headings that no use I found the config variable MS_DEFAULT_MAINTASKPATH = MT Tasks. MT Tasks is the header displayed in Task Manager Dialog. I have this defined in my standards.cfg file so everyone is set up this way by default.


Re: Change Elements Elevation with in the drawn polygon and break lines (Microstation V8i Using MDL Language or C#.Net)

$
0
0

In case of polygon from points, tolerances have no effect.

These settings are used when curves or spheres are faceted.

Pass 0, 0, 0, 3 to get triangulated mesh element from your shape element.

As input use descriptor made using mdlElmdscr_createFromVertices with 'closed' parameter set to TRUE.

Example:

MSElementDescrP poylgElm;
MSElementDescrP meshElm;
if (
SUCCESS == mdlElmdscr_createFromVertices(&polygElm, NULL, points, num_points, TRUE, FALSE)
&&
SUCCESS == mdlMeshDscr_fromElmdscr(&meshElm, polygElem, MASTERFILE, 0,0,0,3,FALSE)
)
{
  // use mesh element
  mdlElmdscr_freeAll(&polygElm);
  mdlElmdscr_freeAll(&meshElm);  
}

Re: Get Element Range Points ( 8 Points ) Microstation V8 Using MDL Language.

$
0
0

What you need these 8 points for?

Re: Get Element Range Points ( 8 Points ) Microstation V8 Using MDL Language.

$
0
0

Instead of Creating Mesh my sir said me to create programmatically like, as show in the figure.

Re: Get Element Range Points ( 8 Points ) Microstation V8 Using MDL Language.

$
0
0

Finally Create Like , As shown in the image

Re: Get Element Range Points ( 8 Points ) Microstation V8 Using MDL Language.

$
0
0

For this result you need only range and find intersections with lines along its Y axis.

Re: Get Element Range Points ( 8 Points ) Microstation V8 Using MDL Language.

$
0
0

I think the best solution for your tool would be to pass X axis parallel line through each considered point finding intersection points on polygon. But, that like solution will be perhaps not good if polygon points elevation will be changing in different direction.

Re: [v8i SS3 MDL] Managing task navigation dialog

$
0
0

Jan Slegr:

by default all tasks and workflows in tree and defined in DGNLIB files in are displayed.

To open only selected task or workflow, you have to choose it from task tree. It's easy to be done manually, but I have no clue how to do it from the code. 

Hi Jan,

Thank you. As you said, manually selecting active task from the task tree is the best way I could find. :)

Jan Slegr:

Configured Main Task will remain displayed always, if not changed in User Preferences.

At the moment, I don't know how to do that.

Regards,

Ahmet Sedat ALIS


Re: [v8i SS3 MDL] Managing task navigation dialog

$
0
0

Jon Summers:

Perhaps it's similar to the print engine, where we can change settings only through key-ins?

Hi Jon,

Thank you. As Jan mentioned, task sendtaskchangedasync key-in is recorded by VBA but when you key-in it doesn't work.

Regards,

Ahmet Sedat ALIS

Re: [v8i SS3 MDL] Managing task navigation dialog

$
0
0

mwlong:

I have also created a custom .dgnlib to develop my own custom task dialog. In order to see only my custom task dialog without all of the other task headings that no use I found the config variable MS_DEFAULT_MAINTASKPATH = MT Tasks. MT Tasks is the header displayed in Task Manager Dialog. I have this defined in my standards.cfg file so everyone is set up this way by default.

Hi mwlong,

Thank you. This sounds good. :) MS_DEFAULT_MAINTASKPATH does not exist as a system configuration variable on Workspace > Configuration. I defined it as a user parameter and set it to my custom task header. After saving ucf file and re-launch, it doesn't select my custom task dialog.

Regards,

Ahmet Sedat ALIS

Re: [v8i SS3 MDL] Managing task navigation dialog

$
0
0

I'm not sure why it is not working. I did find this key-in to change the active task "task active MT Tasks" (no quotes needed". If I use "task active Drawing" it switches the task dialog to display only the Drawing tasks. You could add the key in for different tasks to a function key or a custom icon or menu item.

Hope that is something that will solve your problem.

Re: [v8i SS3 MDL] Managing task navigation dialog

$
0
0

mwlong:
If I use "task active Drawing" it switches the task dialog to display only the Drawing tasks.

I tried this key-in in MicroStation V8i (SELECTseries 3) Update 2 and it activates the task (opens it), but doesn't make the task the only visible as it can be done by selecting the task from the task tree.

Re: Get Element Range Points ( 8 Points ) Microstation V8 Using MDL Language.

$
0
0

DanPaul:
What you need these 8 points for?
Daniel Christopher:
Instead of Creating Mesh ...

You seemed to have veered off-topic. Creating a mesh has little to do with your original question, which I think DanPaul and Jan have answered. Please respect the Forum guide-lines and start a new thread.

In your new post, please state …

  1. Whether you are working in 2D or 3D
  2. What is the goal of your construction — it looks like some sort of triangulation?
  3. Why isn't a mesh appropriate?

Regards, Jon Summers
LA Solutions

Re: DItem_PulldownMenuRsc

$
0
0

dw_elliott:
If I change it to ALIGN_LEFT and re-compile, it works great

I suggest that you write a simple app. that illustrates this problem.  For example, modify the menu in the Basic SDK example.  Then submit that as evidence to Bentley support.

Re: MVBA Modify Length of Line String

$
0
0

Aldrin Almia:

I identify how many vertices of a Line string then get the Length of the last segment by this code:

strLength = oElem.Current.AsLineElement.Length

Where does oElem come from?  If it's an ElementEnumerator, what are you enumerating?  It can't be a LineElement, because LineElement.GetSubElements does not exist.  If it's a ComplexStringElement then you've found a LineElement and you're measuring its entire length, not the length of the last segment.

Maybe this is a question of terminology.  A line segment means the line that connects two vertices of a line-string.  Given a line-string having four vertices ...

Dim vertices () As Point3d
vertices = LineElement.GetVertices
Dim length As Double
' Segment 0
length = Point3dDistance (vertices(0), vertices(1))
Debug.Print "Segment 0 length=" CStr(length)
' Segment 1
length = Point3dDistance (vertices(1), vertices(2))
Debug.Print "Segment 1 length=" CStr(length)
' Segment 2
length = Point3dDistance (vertices(2), vertices(3))
Debug.Print "Segment 2 length=" CStr(length)




Re: Get Element Range Points ( 8 Points ) Microstation V8 Using MDL Language.

$
0
0

This shape is either 2d or is at least planar if 3d...otherwise the "midpoint" edit handles wouldn't be displayed...

Assuming the cyan lines are equally spaced, this looks like output you could get from mdlPattern_hatch?!?

-B

Re: [v8i SS3 MDL] Managing task navigation dialog

$
0
0

I found this key-in also.

tasktoolbox initialize MT Tasks

If you close the task dialog box first and then use the key-in mentioned above and I used save settings, this task should open the next time you open Microstation.

Hopefully this works for others.

By the way, if you leave the default task dialog open and use the previously mention key-in, a separate task dialog will open. You can use

 tasktoolbox initialize

to open the default task dialog at any time while still displaying your chosen task dialog.

Re: Get Element Range Points ( 8 Points ) Microstation V8 Using MDL Language.

$
0
0

Hi,

You can try this method also.

Extract Polygon Range - Min and MAX points

Get the vertical height of the polygon  (VerHt = Max.Y - Min.y)

Get the horizontal width of the polygon (HorWid = Max.X - Min.X)

assume that the Interval Distance between the horizontal lines is 0.5.

So, the NoOfLines need to be created is (NoOfLines = VerHt / IntervalDist)

In a for loop create horizontal (NoOfLines) lines from the MIN point

for (i=0 to NoOfLines)

  p1 = MIN

  p1.y = MIN.y + (i * IntervalDist)

  p2 = MIN

  p2.x = MIN.x + HorWid

Next i

Then for each created line,

a. find out the intersection point on the polygon.

b. Using 'PartialDelete' method, split the line. You will get 2 lines.

c. Check whether the mid point of each line is inside the polygon, by using 'Point3DInPolygonXY' method.

d. If the point is outside, delete that part.

HTH

Sivag

Re: mdl call from vba

$
0
0

Here's some code that I think may be equivalent to the MDL functions. Not tested; you may have to tweak some lines.

' mdlVec_computeNormal(&xVector,point+1,point);
Dim xVector As Point3d
xVector = Point3dNormalize (Point3dSubtract (point (1), point (0)))

' mdlView_getParameters(NULL,NULL,NULL,&rMatrix,NULL,view);
Dim viewRot As Matrix3d
Dim oView As View
... get view from somewhere
viewRot = oView.Rotation

' mdlRMatrix_getRowVector(&zVector,&rMatrix,2);
Dim zVector As Point3d
zVector = viewRot.RowZ

' mdlVec_crossProduct(&yVector,&zVector,&xVector);
Dim yVector As Point3d
yVector = Point3dCrossProduct (zVector, xVector)

' mdlVec_projectPoint(&yPoint,point,&yVector,fc_1);
Dim yPoint As Point3d
yPoint = Point3dAdd (point(0), yVector)

' mdlDim_defineRotMatrix(&rMatrix,&dim,point,&yPoint,point+1);
Dim dimRotation As Matrix3d
dimRotation = Matrix3dFromPoint3dColumns (point(0), yPoint, point(1))
... get dimension from somewhere
oDimension.Rotation = dimRotation

Regards, Jon Summers
LA Solutions

Re: Convert macro to VBA DIMSET and WORDPROC

$
0
0

One thing you can try is to use the CExpressionSetValue and GetValue to call these.  Another would be to look at the settings object to see if it has these settings.  And finally try the DimStyle object for the dimension setting.

HTH,

Viewing all 1677 articles
Browse latest View live


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