How to copy elements from one .dgn to another

Hi All:

How do you copy elements from one .dgn file to another and keep the elements at the same x, y.

In AutoCad I would copy and paste at 0,0...but can't find the command in Microstation.

Thanks!

Parents
  • If you've ever tried to copy elements from an XREF in AutoCAD, you might think the process in MicroStation is fraught with peril, but MicroStation's Reference Files are far more flexible and friendly than AutoCAD.

    The idea of attaching a reference file to copy a few elements from another file seems very foreign to an AutoCAD user, but long before either of these packages supported the Windows Clipboard, that was the only way to do this. In AutoCAD, you would have to WBLOCK out the elements and INSERT and EXPLODE to accomplish the same thing. And that left the DWG sitting somewhere on your drive.

    With the MicroStation workflow, the preocess was simple and fast. And everyone used the XY, DX, DL keyins all of the time, so they were like second nature.

    This process also allowed you to fix global origin or datum shifts. You could use the move reference command to get the reference file into the proper datum and coordinates and then copy or merge the data into the active file. All you needed was one point of commonality in both files to line up and if the master units were identical, set a scale of 1:1 and even adjust for working units discrepancies.

    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
  • This works for me...

    1. Select elements to copy
    2. Tentative snap at 0,0 or base point
    3. Copy
    4. Paste
    5. DP to 0,0 or base point
  • I went through this discussion almost 2 yrs ago. Trying to use the clip board is cumbersome in ustn for the very reason that you have to create a reference snap element at 0,0. The easiest way to do it is via XREF and then merge or select and copy, as has been mentioned. It really is no more work than opening the source file, selecting and copying to the clip board. There are certain advantages to the reference approach anyway such as you don't have to have 2 drawing sessions open at once and you also get the elements transformed to suit your drawing units and coordinate system, something you can't do with the clip board.

    The main advantage to the clip board is when you need to paste the clip board data into several model files or layouts i.e. "cloning" as Phil pointed out. Sometimes we do need to do that Phil, typically when adding some type of sheet text common to multiple layouts and needing to position it independently. Of course that could be done with a reference too but it having reference files for numerous pieces of text like that can result in a lot of references.

    Neil Wilson (aka Neilw)

    Power Civil v8i 08.11.07.245

    AutoCAD Civil 3D 2018

  • Fully understand the ref way, this thread is for the none ref way.
  •  

    Unknown said:

    This works for me...

    1. Select elements to copy
    2. Tentative snap at 0,0 or base point
    3. Copy
    4. Paste
    5. DP to 0,0 or base point

    Can you help, I'm stuck on step 2. How do you get the snaps to turn on so you can create the tentative snap point? I know what my tentative snap button is, but I don't know how to turn snaps on before I use it.

    (AccuSnap enabled, Snap Lock on, Keypoint on)

  • Finally I found the solution to exactly imitate the autocad copy with basepoint command in this thread! The solution is to make a tentative snap as described earlier. I´ll try to clarify the instructions thermal wrote since they are not so very detailed.

    1. Select element(s) to copy

    2. Make a tentative snap at desired basepoint by klicking right and left mouse button at the same time. (It's also possible to get a snap! First press and hold ctrl+shift, then move the mouse without pressing any button on it. When the snap symbol is at the desired location, release ctrl+shift and make tentative snap before the snap symbol dissapears.)

    3. Edit, copy or crtl+c

    4. In the other file: edit, paste or ctrl+v

    5. Move the mouse pointer to the basepoint and accept with left mouse button.

    Phil: This workflow is very often desirable. You often want to use it when you want to add an element to several files to the same location. Maby a text element that has to be placed in each drawing at the same place but with different content in each drawing. Being able to paste it to it's correct location on the fly saves a lot of clicks. Even if you have to manipulate it after it's been pasted time has been saved since a few seconds of saved time can become hours if you have to do this on many places. The reference method just isn't applicapable in theese cases. There is also a nuber of other cases that this procedure is quick to use but I can't explain them all. You have to take my word for it.

    Actually this is a question that comes from, I would say, every new co worker that's been using AutoCad in their previous office. Until now I've always answered them that it's not possible in Microstaion and they can't believe it's true...

    Obviously one would like to have this function more easily accessible. Right click element, select copy with basepoint from the meny or something like that.

     

  • Ingemark,

    From my perspective, using a tentative snap is not the issue. The problem is how to tentative snap precisely to coordinate 0,0. Without an element at that point there is no way to use a tentative snap. How do you do it?

    Neil Wilson (aka Neilw)

    Power Civil v8i 08.11.07.245

    AutoCAD Civil 3D 2018

Reply Children
  • Since you need to issue a tentative snap without accepting it, there is no way that I know of to set the "base point" to a keyed in coordinate. Unless you try programmatically.

    I seem to recall making a macro that issued a tentative point at a point from a data point. It was three jobs ago, and at least four years, so I cannot recall the reason or workings. And as this was from a Pre-V8 time for me, it was an MBE Basic macro, not a VBA macro.

    The was a MbeSendTentPoint in MBE Basic, and there is a SendTentativePoint method in MVBA, so I must assume that given a block of time, it would not be too hard to cobble together a VBA Macro that could create a "Copy to Clipboard with keyed-in basepoint" tool.


    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
  • neilw,

    Your'e right. The tentative snap method only works with a reference element. Luckily for me this is often what i need. But how to do it relative to 0,0 without having an element there I don't know.

  • Hi again neilw,

    Not saying it's optimal, but this method might be something to give a chance.

    Select element to copy, then run the following macro:

    (The VBA-script places a point in 0,0 then makes a tentative snap to it and copies the selection to the clipboard.)

    Sub copyatzero()

       Dim startPoint As Point3d

       Dim point As Point3d, point2 As Point3d

       Dim lngTemp As Long

    '   Start a command

       CadInputQueue.SendCommand "PLACE POINT"

    '   Coordinates are in master units

       startPoint.X = 0

       startPoint.Y = 0

       startPoint.Z = 0#

    '   Send a data point to the current command

       point.X = startPoint.X

       point.Y = startPoint.Y

       point.Z = startPoint.Z

       CadInputQueue.SendDataPoint point, 1

    '   Send a tentative point

    '   Coordinates are in master units

       CadInputQueue.SendTentativePoint Point3dFromXYZ(0, 0, 0#), 1

       CadInputQueue.SendCommand "MDL KEYIN CLIPBRD CLIPBOARD COPY"

       CommandState.StartDefaultCommand

    End Sub

    Go to the other file and ctrl+v. You have to snap to 0,0 in the other file yourself. (The last step is probably possible to script as well, but I won't do it now.)

  • Posting the paste script as well. If you assign these two scripts to two corresponding buttons you have a good copy/paste to original coordinates functionality.

    Sub Pasteatzero()

       Dim startPoint As Point3d

       Dim point As Point3d, point2 As Point3d

       Dim lngTemp As Long

    '   Start a command

       CadInputQueue.SendCommand "MDL KEYIN CLIPBRD CLIPBOARD PASTE"

    '   Coordinates are in master units

       startPoint.X = 0#

       startPoint.Y = 0#

       startPoint.Z = 0#

    '   Send a data point to the current command

       point.X = startPoint.X

       point.Y = startPoint.Y

       point.Z = startPoint.Z

       CadInputQueue.SendDataPoint point, 1

    '   Send a reset to the current command

       CadInputQueue.SendReset

       CommandState.StartDefaultCommand

    End Sub

  • have you all watched: NINJA POINT (some more to laugh)

    communities.bentley.com/.../paste-elements-at-same-graphical-location.aspx

    Regards

    Frank

    since 1985: GIS, CAD, Engineering (Civil)  Senior Consultant : [Autodesk Civil 3D , Esri ArcGIS, VertiGIS: in previous days : Bentley MS V4 - V8i, GeoGraphics, Bentley Map V8i, InRoads,  HHK Geograf, IBr DAVID] :  Dev: [C, C++, .NET, Java, SQL, FORTRAN, UML]
    [direct quote by: http://en.wikipedia.org/wiki/Helmut_Schmidt]: "Wer Kritik übel nimmt, hat etwas zu verbergen"
    Wer Grammatik- und/oder Rechtschreibfehler findet, der darf sie behalten :-)