Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
[Archived] AskInga Wiki Place cells, line styles and patterns to scale with this macro
    • Sign In

    • -AskInga
      • +3D MicroStation
      • +AccuDraw Secrets
      • +Animation - Rendering
      • +Behind The Scenes
      • +Cells
      • +Colours
      • +Conversion - Translation
      • +Coordinate Input
      • +Design Settings
      • +Dimensions
      • +DWG
      • +EDG
      • -Element Manipulation
        • AccuSnap shortcuts
        • Active Angle Assistant macro **UPDATED**
        • Adjust the holes inside a group hole
        • Align your elements
        • Analyze your curves
        • Auto-drop multi-lines as you place them
        • Automate the locking of your elements
        • Better intersection snapping in V7
        • Bring elements to front
        • Change associative hatch colour
        • Change complex shape to simple shape
        • Change fence mode from status bar
        • Change hatch symbology
        • Change the display order of your elements
        • Change verticies with copy parallel
        • Clipping elements with fences turns them into shapes
        • Combine - merge existing shapes
        • Construct a circle tangent to three lines in pre-XM
        • Construct tangent circles in XM
        • Control pattern-hatch placement
        • Convert simple shapes to linestrings with this VBA
        • Cool graphics with array
        • Copy a complex shape parallel
        • Copy selection sets with the CTRL key
        • Create an element halo with this macro
        • Draw revision clouds in MicroStation XM
        • Draw revision clouds in pre-XM MicroStation
        • Efficient intersection snapping
        • Enabling a disabled AccuSnap
        • Faster flood fills
        • Force input focus into key-in window
        • Get to AccuDraw and PopSet settings faster
        • Get to AccuSnap settings faster
        • Hatch on the active level
        • Hatch selected areas dynamically
        • Hatching alternating areas
        • Hide an element by key-in
        • Hide elements by using named groups
        • Hide elements by using options in right-click menus
        • How to draw a line perpendicular to an arc at a specific point
        • Identify filled shapes by poking on inside
        • If copying from the clipboard doesn't work
        • LA Solutions announces FlexiTable for MicroStation
        • Learning MicroStation is so easy!
        • Lock Tags to prevent manipulation
        • Make move element behave like V7
        • Match and change
        • Measure a distance with copy parallel
        • Measure multiple elements
        • Measure selected areas dynamically
        • Measure slopes, latitudes and departures with this macro
        • MicroStation is easy
        • Missing edit handles
        • Modify - sweeten a b-spline
        • Modify handles for multiple elements
        • Modifying some but not all element handles
        • More on flood fills
        • Move hatch intersection point with ease
        • Multiple copies of something
        • Need lots of holes?
        • Need to flatten a file
        • Place an arc by edge an a smartLine
        • Place an arc by its length in V7
        • Place an arc by its length in V8
        • Place an arc tangent to another element
        • Place an arc tangent to three elements
        • Place cells, line styles and patterns to scale with this macro
        • Place composite curve - default setting
        • Play bingo with GeoGraphics!
        • Pop-Up snaps menu
        • Popup for available tasks
        • Recall AccuDraw keyins
        • Right click on element to exchange into that file
        • Right click on element to open another instance of MicroStation
        • Scale - rotate elements about their origin
        • Stretch your elements without a placing fence
        • Suspending AccuSnap
        • The active angle dialog
        • The rules
        • Toggle between tangent points
        • Total length of lines
        • Transient elements in MicroStation V8
        • Understanding PopSet
        • Unlock angle preservation when manipulating handles
        • Unlock angle preservation when modifying fence vertices
        • Use clipboard operations to salvage pre-edited graphics
        • Use element manipulation tool on references
        • Use multiple cutters with the trim elements tool
        • Use the space bar to toggle the axis lock
        • What drop element has no use fence
      • +Element Properties
      • +Element Selection
      • +Freeware - Shareware
      • +Interface Look And Feel
      • +Internet - E-Links - Links
      • +Keyins
      • +Levels
      • +Line Styles
      • +Models
      • +MSM Archive
      • +Other
      • +Presentations
      • +Printing - Plotting
      • +Programming - Automation
      • +Rasters - Images
      • +References
      • +Tags - Data Fields - Fields
      • +Text - Fonts - Annotation
      • +Views
      • +Windows - Interacting With
      • +Workspaces - Configuration
    • graffiti

     
     Questions about this article, topic, or product? Click here. 

    Place cells, line styles and patterns to scale with this macro

    AskInga logo

    Original Article Date: Nov 7, 2005

    With thanks to Alexie Karavakis for this collection of macros that can be used to place cells, custom linestyles and patterns to scales calculated from the active model annotation scale. Note that these macros have been designed to be run from keyins which can be executed from a bar menu, the settings manager, user defined icons or web pages.

    Download 271.zip and extract the contents from the zip file.
    Place all mvbas in the folder pointed to by MS_VBASEARCHDIRECTORIES
    Keyin vba load PlaceToScale to load the project, or...
    Configure MS_VBAAUTOLOADPROJECTS to automatically load the mvba project upon startup.

    Notes:
    This VBA Project contains a number of macros that are ideally kicked off with a keyin. These keyins can be executed via the Settings Manager, a bar menu, user defined icons or even a web page.

    You can also use these keyins as the foundation for "keyin scripts". For example, you could append ac=36InchDoor;place cell icon to the keyin for cellscale

    In the following descriptions, you'll see a reference to the active model scale, this is referring to the Annotation Scale setting located and defined in the Model Properties dialog.

    LSSET
    Keyin vba run [PlaceToScale] modPlaceToScale.LSSET
    Sets the active line style scale to the value set by the current active scale.
    For example, if the active scale is 4.83, then the line style scale factor will be set to 4.83


    LSSET_M
    Keyin vba run [PlaceToScale] modPlaceToScale.LSSET_M passed_string
    Sets the active line style scale to the value set by current active model scale or passed_string.
    If a string is passed it will use that rather than the active model scale.
    Sample: With the active model scale = 25, vba run [PlaceToScale] modPlaceToScale.LSSET_M, the line style scale will be 25
    Sample: With the active model scale = 25, vba run [PlaceToScale] modPlaceToScale.LSSET_M 15, will set the line style scale to 15.



    LSSCALE
    Keyin vba run [PlaceToScale] modPlaceToScale.LSSCALE passed_string
    Sets the active line style scale to the same value set by current active Scale X active model scale.
    Sample: With the active model scale = 25, and the active scale = 0.5, then the resulting line style scale is set to 12.5.


    LSSCALE_M
    Keyin vba run [PlaceToScale] modPlaceToScale.LSSCALE_M passed_string
    Sets the active line style scale to the value calculated by the active model scale X passed_string.
    If no string is passed, it will use a value of 1.
    Sample: With the active model scale = 20 and no string is passed, the line style scale will be set to a value of 20.
    Sample: With the active model scale = 20, vba run [PlaceToScale] modPlaceToScale.LSSCALE_M .1, will set the line style scale to 2.


    CELLSCALE
    Keyin vba run [PlaceToScale] modPlaceToScale.CELLSCALE passed_string
    Sets the active cell scale to a value calculated by the current active model scale x passed_string.
    Sample: With the active model scale = 20, and the active scale = 0.5, vba run [PlaceToScale] modPlaceToScale.CELLSCALE will set the active X, Y and Z scale factor is set to 10.


    CELLSCALE_M
    Keyin vba run [PlaceToScale] modPlaceToScale.CELLSCALE_M passed_string
    Sets the active cell X and Y scale to a value set by the current active model scale X passed_string.
    If no string is passed, it will use a value of 1.
    Sample: With the active model scale = 20, vba run [PlaceToScale] modPlaceToScale.CELLSCALE_M, will set the active scale X, Y & Z factor to 20.
    Sample: With the active model scale = 20, vba run [PlaceToScale] modPlaceToScale.CELLSCALE_M .1 will set the active scale X, Y & Z to 2.


    PATSCALE
    Keyin vba run [PlaceToScale] modPlaceToScale.PATSCALE
    Sets the active pattern scale to value set by the current active model scale X passed_string
    Sample: With the active model scale = 20, and the active scale = 0.5, vba run [PlaceToScale] modPlaceToScale.PATSCALE, will set the pattern scale to 10.


    PATSCALE_MKeyin vba run [PlaceToScale] modPlaceToScale.PATSCALE_M passed_string
    Sets the pattern scale to value set by current active scale X passed_string.
    If no string is passed, it will use a value of 1.
    Sample: With the active model scale = 20 vba run [PlaceToScale] modPlaceToScale.PATSCALE_M will set the pattern scale to 20.
    Sample: With the active model scale = 20, vba run [PlaceToScale] modPlaceToScale.PATSCALE_M .1 will set the pattern scale to 2.


    PAT_R_SPACE
    Keyin vba run [PlaceToScale] modPlaceToScale.PAT_R_SPACE passed_string
    Sets pattern row spacing to value set by current active scale X passed_string
    If no string is passed, it uses 0
    Sample: With the active model scale = 20, vba run [PlaceToScale] modPlaceToScale.PAT_R_SPACE will set the pattern row spacing to 0
    Sample: With the active model scale = 20, vba run [PlaceToScale] modPlaceToScale.PATSCALE_M .1 will set the pattern row spacing to 2.


    PAT_C_SPACE
    Keyin vba run [PlaceToScale] modPlaceToScale.PAT_C_SPACE passed_string
    Sets the pattern column spacing to value set by current active scale X passed_string
    If no string is passed, it uses 0
    Sample: With the active model scale = 20, vba run [PlaceToScale] modPlaceToScale.PAT_C_SPACE will set the pattern row spacing to 0
    Sample: With the active model scale = 20, vba run [PlaceToScale] modPlaceToScale.PAT_C_SPACE .1 will set the pattern row spacing to 2.


    PAT_R_C_SPACE
    keyin vba run [PlaceToScale] modPlaceToScale.PAT_R_C_SPACE passed_string
    Sets the pattern row and column spacing to a value set by current active scale X passed_string
    If no string is passed, it uses 0
    Sample: With the active model scale = 20, vba run [PlaceToScale] modPlaceToScale.PAT_R_C_SPACE will set the pattern row and column spacing to 0
    Sample: With the active model scale = 20, vba run [PlaceToScale] modPlaceToScale.PAT_R_C_SPACE .1 will set the pattern row and column spacing to 2


    PAT_ANGLE
    keyin vba run [PlaceToScale] modPlaceToScale.PAT_ANGLE passed_stringSets the pattern angle to value set by the current passed_string.
    Sample: vba run [PlaceToScale] modPlaceToScale.PAT_ANGLE 45 will set the pattern angle to 45.


    PLACETXT
    keyin vba run [PlaceToScale] modPlaceToScale.PLACETXT passed_stringPuts the text you pass into the text editor dialog.
    Sample: vba run [PlaceToScale] modPlaceToScale.PLACETXT Concrete Walk will stick the word Concrete Walk into the text editor ready.

    These programs are supplied as is. These programs do not come with support. AskInga, Bentley Systems Inc., and the author of these programs assume no liability for damages direct, indirect, or consequential, which may result from the use of these programs. Use these programs at your own risk.

    AskInga Article #271

    • Askinga
    • Element Manipulation
    • Article
    • Share
    • History
    • More
    • Cancel
    • Hannah Blye Created by Hannah Blye
    • When: Tue, May 13 2008 4:28 PM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Mon, Jun 14 2010 9:12 AM
    • Revisions: 8
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies