Hello Guys, I'm new in Microstation so I've been looking for how to write scripts in Microstation. Does anyone can help me with the theory and the basics?
Do you mean animation scripts? Here's a start with some ancient tutorials.
https://communities.bentley.com/communities/other_communities/askinga/w/askinga/3688/animation-rendering
Tell us some more about what you want to achieve, besides you wanting to get to know the basics (which is a good reason btw). We can help you better if you tell us what you try to do or what you did so far.
Ivo Blaauw= = = = = = = = = = = = =Look what the CAD dragged in...
I use a few scripts like shown at the link below about halfway down the page.
https://communities.bentley.com/communities/other_communities/askinga/w/askinga/389/how-to-string-keyins-together-or-create-keyin-scripts
Answer Verified By: Andres Solis
Hey Jonh,
thanks for your response. what I'm looking for is an keyin-script to perform the following procedure:
Open a dgn file
insert a cell
close and save the file
do you think is possible on Microstation. I have an script to do that for autovad, but I don't how to do it in Microstation.
why not do it manually and at same time use the record macro either vba or Basic just to get the keyins this is great..
but placeing the cell will be a problem if you dont want the cell placed in exactly the same place
to do this via the batch processor which uses a custom script text file to process the commands it the best way
you dont even need to tell it to open dgn as its the dgns you choose in the browser that tells it to open which drgs
common keyins to do what you want in part
to attach cell library
RC="fullpath to cell library use quotes if has spaces in path" eg RC="C:\DGN\MY OWN CELLS.CEL"
AC=ACTIVE CELL NAME ( THIS COMES FROM THE CELL LIBRARY ABOVE)
to save and close and move to next drg in list
FILE DESIGN
----------------
Note you can also run the macro you created inside the batch script as your script if it finds the right cell and places it where you want.. then
the command would be if
VBA load < vba name>
vba run vba module name
or old school basic macro in batch process
macro BASIC MACRO NAME
-----------------------------------
note BASIC has been deprecated after V8i and is no longer available nor able to run after v8i so perhaps your better off with vba from the start...
Lorys
Started msnt work 1990 - Retired Nov 2022 ( oh boy am I old )
But was long time user V8iss10 (8.11.09.919) dabbler CE update 16 (10.16.00.80)
MicroStation user since 1990 Melbourne Australia.click link to PM me
That is absolutely possible. It may even be able to accomplish without any complicated programming.
Lorys is well on the way with the keyins below. the "RC=" command (with full path) will attach the cell (block) library that contains the cell and the "AC=" command (with cell name) will set the desired cell as active.The next command you would need is "PLACE CELL". Here's where this might get complicated, depending on what you want to do.
Is the cell going to the same coordinates every time? If so, the next line in your script would be XY= #,#,# where the numbers are the X, Y & Z coordinates.You would also have the option to (instead of giving it the coordinates) place the cell with a data point.
If you plan to use this as more of an interactive tool, you probably can't write that into a standalone script that will run automatically without using VBA or MDL.
MaryB
Power GeoPak 08.11.09.918Power InRoads 08.11.09.918OpenRoads Designer 2021 R2