Batch Process- Microstation

January 26, 2019 | Author: akshata_ankalikar | Category: Computer File, Operating System Technology, Portable Document Format, System Software, Software
Share Embed Donate


Short Description

Microstation 101 Batch Process...

Description

MicroStation 101 Batch Process: Underrated? Overused? What ever you think of Batch Process you can’t knock it. Saving time and money, not to mention your sanity. Let your users unleash the power of Batch Processes – if you dare!

What’s the official blurb? The batch process toolbox can create and run a script that can be performed on individual files or entire directories of files. The script is a text file that contains a series of MicroStation key-ins that can run commands, MicroStation BASIC macros, VBA macros, or MDL applications. Where is it? Utilities > Batch Process will bring up the dialog box

Looks pretty similar to Batch Convert dialog. Similar and even easier to use. To create a new Batch Process click on the “Create a new command file” tool

Enter the name of your process to create a .txt file. Normally server based Batch Process files are kept in …/workspace/Standards/Data. Your newly created txt file will open immediately. You need to add your process to it.

 © 2007 EatyourCAD, Karen Fugle

Um…what am I processing? Oh, come on now, look around! There must be dozens of dull repetitious work that you could process. Examples please? The things I do for you. Some examples show multiple commands together in one keyin. The ; does the same as putting the keyins on a separate line. It is easier to see commands when you have all on a different line though. Note that you don’t need to use the [ ] brackets. Turning a level off in view 3 of multiple files (Note: “of” not “off”) Of=levelname;selview 3 Turning off all levels in view 3 Of=all;selview 3 Turning a level off in a view 3 Of=levelname;selview 3 Turning off a level in a reference file.  el  [] [ erence  name]  Turning off a level in a reference file.  el  [] [ erence  name]  Turning on level in view 3 On=levelname;selview 3 Turning a level off Level Set Display [On|Off|Toggle] [file:filename] [levelname] Selecting a level Level Element Select levelname Changing the colour/weight/style Bylevel Level Set Bylevel Color [Color index number][file:filename][levelname] Level Set Bylevel Style [Style number][file:filename][levelname] Level Set Bylevel Weight [W eight number][file:filename][levelname] e.g. Level Set Bylevel Color 2 file:floorplan.dgn A-F3-G-circ; update 1 (update 1 refreshes the view to show changes) Changing a colour/weight/style Override Level Set Override Color [On|Off|Toggle] [Color index number] [file:filename] [levelname] Level Set Override Style [On|Off|Toggle] [Style number] [file:filename] [levelname] Level Set Overrride Weight [On|Off|Toggle] [W eight number] [file:filename] [levelname] Changing active weight/color/style Level Element Select levelname ;active weight 2;active color 1;active style 4

 © 2007 EatyourCAD, Karen Fugle

Select a model Model active [modelname] Change attributes in another model e.g. Level Set Bylevel Color 2 [file:floorplan.dgn] [model:floor version b] A-F3-G-circ; update 1 Place smartline Xy=0,0 Dx=1,0 Xy puts a point at 0,0 Dx puts a point relative to the first point you place.

Setting a view attribute e.g. the grid off and fill on Set grid off Selview 1 Set fill on Selview 1 Filedesign Selview 1 applies the settings in view 1. Filedesign saves the settings. If you do not include a Filedesign, the view attributes wil l revert the next time you open the DGN.

Open a view View on 1 Changing the selection or the highlight colour Set highlite green Set xor green Xor is the selection set colour (for some strange reason).

Setting the LTscale  \ltscale=100 Attaching one reference to multiple files rf=[full path with back slashed file path],[model name],[logical name],,* The first comma after logical name is description – I have put none The second comma is view name - * for coincident, # for coincident world

If you use live nesting: rf=[full path with back slashed file path],[model name],[logical name],,*,1,on 1 = nest depth On = attach the raster references as well. ...and that’s all you can do.

Move elements in a 3D file vi=top selview 1 Powerselector all move extended xy=0,0 dx=5326,1808 powerselector deselect view previous

 © 2007 EatyourCAD, Karen Fugle

selview 1 fit view extended 1 filedesign The elements will be moved by the distance specified by “dx=”.

Fit all in view 1, then save a preview of it (good for old files that need to be previewed via a thumbnail). Set your personal config to MS_OPENV7= 1 - this converts v7 to v8, then use; fitall selview 1 sv=preview selview 1 filedesign

Where can I find all these keyins? In the MicroStation V8 XM Edition Help file’s Contents tab you will find the keyin index at the bottom of the list.

But I like you so much I’ve put a few more with explanations down for you. Have fun! filedesign filedesign is Save Settings (hence why the shortcut is Ctrl+F. I'm f ull of trivia, huh?). powerselector all Selects everything (even elements that are not displayed) co=bylevel Changes everything's colour to B yLevel powerselector deselect Deselects everything level set overrides 0 all Sets all overrides to white. Doesn't turn them on/off though. level set override color on all Turns all colour overrides on. LEVEL ELEMENT MOVE dest:A-G22-G-Floor Floor Moves all elements from "Floor" to "A-G22-G-Floor"

 © 2007 EatyourCAD, Karen Fugle

LEVEL PURGE dest:A-G22-G-Floor Floor Deletes "Floor" and moves the elements to "A-G22-G-Floor" level delete unused Deletes (purges) all unused levels reference levels off s-z011-t-leeds bordera4l Turns off the level "s-z011-t-leeds" in the reference "bordera4l" (using the logical name t o avoid ambiguity where two versions of the same file are attached). selview all filedesign Selects all views. Saves Settings. Useful for turning levels on/off. ref lev off 50-54 border;selview all;ref lev on 52 border;selview all;filedesign; remember the ; does the same as putting the keyins on a separate line. Word of advice though – it is easier to read the script when you have all commands on a different line. ref lev off 50-54 border selview all ref lev on 52 border selview all filedesign Turns off the level numbers 50 to 54 in the reference file with the logical name “border”, then turns level number 52 back on. compress design Compresses the file. But this depends on what compress options you have set. If you have none set, it will just get rid of deleted elements. expand set MS_COMPRESS_OPTIONS = +LEVELS Sets the compress options to always make sure Levels is on before compressing. Does the same as "level delete unused". expand set MS_COMPRESS_OPTIONS = +LEVELS expand set MS_COMPRESS_OPTIONS = -textstyles These settings must be done on separate lines, as the config MS_COMPRESS_OPTIONS uses semicolons to list its multiple options and therefore is misinterpreted in this context But an easier way is using Compress options on all Turns all your compress options on. Hey, we give more help than the help file!

compress library Compresses a dgnlib. ct= filedesign As a keyin ct= works by detaching the colourtable and uses the default (but doesn’t attach it). But here it doesn't work! The space after ct= is not recognised. You need to use: colortable default filedesign or to attach your own table ct=D:/Workspace/Standards/data/colortables/my-col.tbl

$ level library export $(basename(_dgnfile)) Exports the levels to a CSV called exactly the same name as the dgn file.  © 2007 EatyourCAD, Karen Fugle

set plotter D:\Workspace\Standards\PlotDrv\pdf plot entity sheet plot paper name A1 $ plot execute $(basename(_dgnfile)).pdf Automatically creates a PDF called the same as the file without prompting to save.

And there you have it. Just remember though, I’ve not personally tested every one of these (what, you think we don’t have a life?). What may work as a keyin may not necessarily work as a batch, so let us know if you find any holes. If you have any favourite batch processes you’d like to pass on, then please send them in to [email protected].

 © 2007 EatyourCAD, Karen Fugle

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF