copy element from one dgn to another dgn - microstation

Is there an equivalent command in microstation for the copyclip with basepoint from autocad to copy an element from one dgn to another dgn?
I tried attaching a reference and copying it that way, but then I can not detach that reference.
I get an error message about not being able to detach a model from a managed model.

Well, have you considered using the FF (FILEFENCE) command?
As you can see from the help topic it can be used in batch processing.
In short, you place a fence around the content to be saved to another file and then in the command window:
ff=<path_to_new_dgn>
Then, once you have your file, open the other DGN, and attach this new file as a reference.
Now go into the reference manager and right-click the attachment. Choose Merge to Master
Now the contents will be part of your DGN file.

Select the element(s) you want to copy.
Set a tentative snap point on the basepoint about which you'd like to copy. To set a tentative point, the default key is middle mouse button. If that button is not assigned, see this link.
Menu Bar > Edit > Copy
Open the drawing you'd like to copy into.
Menu Bar > Edit > Paste
Ensure your settings in the "Paste from Clipboard" dialog box are correct (angle, x scale, y scale).
Click where you'd like to paste.

Related

Is there a way to view / edit the definition of a computed variable after it has been created?

I have created some new computed variables in SPSS. I would like to be able to view the definitions (to check for errors) and possibly edit them after the fact. I cannot find a way to do this or find any advice on the internet.
I can see the definitions in the saved syntax file but there does not seem to be a way to pull the definitions up and view them from the SAV file itself.
Note that this is NOT the same thing as recoding a variable - I want to be able to bring up something like the new variable dialog box for an existing computed variable, view the definition and, if necessary, edit it.
Double-click on the relevant output in your .SAV file.
Select, copy, and paste the COMPUTE statement to a Syntax file.
Edit the COMPUTE statement as desired.
Add the command EXECUTE. after the COMPUTE statement.
Select this block of code.
Click on the 'play' button in the ribbon (or, select Run > Run Selected).
This will recompute the variable.
CAUTION: When you run COMPUTE from syntax, you don't get the warning asking if you want to replace the existing variable.

How do I find in-link history of an object in DOORS?

Background
In DOORS, each object can have both out-links (red arrows pointing right) and in-links (yellow arrows pointing left). You can find the history of out-links with the following procedure:
Right click on an object.
Select Properties... from the drop down menu.
Click on the History tab.
Any item that says Modify Object: Create out-link or Modify Object: Delete out-link has to do with the modification of out-links on an object.
However, no where can I find the history of in-links unless I happen to remember the past module that used to link into the selected object. This has lead me to ask...
Question
Where can I find the history of in-links of an object in DOORS?
Links are always stored in the outgoing module, not in the incoming module (you can notice e.g. that you don't need to open the target module in an edit mode to create an in link, but you always need to open the source module in an edit mode).
Long story short: You find the history of in-links indirectly by looking at the out-links in the other modules.

VFP font size in command window

In the VFP development environment both the command window and any code windows which are open display characters in Courier font, possible 10 pt. I would like to reduce the size of these characters, to see more lines on the screen.
Have tried going into Tools | Options | IDE and have changed several font specifications (for Desktop, Program files, Code Windows, Procedures), clicked on 'Apply' in an attempt to reduce the size of these character on the screen. This has not been successful.
How can I reduce the font size used for code when I am editing it, please?
Check the Override individual settings checkbox on the Options | IDE tab. Otherwise, if you've previously edited a particular PRG, you'll see the font you used then.
For the Command Window, right-click, Properties to set the font.
Most of the time, I use the default, but occasionally I change it by right-clicking within the MODIFY COMMAND window I'm working in, going into "Properties...", and changing the font size. It only applies when editing that filename, though. Many years ago I think I tried changing it globally, as you seem to have, and remember it not 'sticking', so henceforth I always changed it on a file-by-file basis when I needed to.
I think what you are looking for is under Tools / Options / EDITOR tab, and save whatever defaults you want and set as Default.
Additionally, another thing I have done this in the past and created my own master settings resource file. By default when you start VFP, a "resource" file is set to ex: C:\Program Files\VFP\blah\FoxUser.dbf (and the corresponding .fpt file)
What I would do is this. Use the resource file and make an EMPTY copy of it to a new location, such as the working folder of your project.
use ( sys(2005)) again alias tmpResource
copy structure to MyVFPResource
set resource to MyVFPResource
close tables all
The resource file keeps track of almost every thing you open / work with and retains settings such as window area, position, etc. Some things I like to have as a "default", such as when editing snippet methods in screen or class designer. Such as to always have the row/column of a file displayed, have other settings.
An example of common .prg files. Do a simple MODI COMM MyTest.prg. Then once a simple .prg file is open, go to Edit, then Properties. Click on all the settings you want (including font size, line/column, syntax coloring, tabs vs space preferences, etc. Click the checkbox for "Apply to .PRG files". and click ok.
Now, open your resource file AGAIN so you can see what is stored.
use ( sys(2005)) again alias tmpResource
BROWSE
You will see many rows, but at the bottom will be the most recent entries. You should see 3 records listed as "WINDMODIFY" which represents the "MODIFY COMMAND" of whatever prg file. Now, open the "Name" memo field. One will be listed as .prg, another will be "DEFAULT", and the last will be the actual "mytest.prg" you started with. Get on the "DEFAULT" version record. Now you can change the "READONLY" column from FALSE to TRUE (F/T) and it will lock these settings for ALL .prg files. You can then delete the other rows.
You can apply these same principles to modifying form code snippets. Open a form, double-click on any method, then EDIT / Properties, do the same, but checkbox for "Apply to method code".
Browse the resource file and look at the "WINDSNIP" rows. Again, look for "DEFAULT" and mark that readonly as .T. and you can delete the other. The resource file will literally save every snippet window specific to the form, object, method, etc.
Do the same for visual class file editing too.
Similarly can be done for toolbars and more as you browse and see. When you are done making all the changes you want, purge out all the other fluff, close the resource file and set it to read-only so no additional garbage gets pulled into it.
If you need to change in the future, make the table editable again, make changes, then readonly the table again.
Then, all you have to do is at VFP start, do
set resource to MyVFPResource

attempt to index field '' (a nil value)

I was trying to run this script done by SethBling, but it gives me this error:
LuaInterface.LuaScriptException: DP1.state
LuaInterface.LuaScriptException: [string "main"]:337: attempt to index field 'neurons' (a nil value)
This is the code
In case this didn't solve your problem try this:
"If you are using a version of BizHawk that is over 2.0, go into the menu and Click Config then follow as such: Customize > Advanced > Lua Core > Lua+LuaINterface. This is why I wasn't able to load." from JaRetroYT over on reddit.
A flamanis posted this comment on youtube. I followed the instructions and got it working.
HOW TO GET IT TO WORK! THIS ALL TAKES PLACE INSIDE THE FOLDER YOUR BIZHAWK EMULATOR IS IN.
Execpt this part: Before EVER opening the lua console on BizHawk,
(If you have, instructions on how to reset your stuff will be at the
bottom) go onto the level you want to have it learn, and when the
level starts up, click on file. Go down and open the menu of save
state, at the bottom click the create named state, and then finally
name it DP1, however put it after all the slashes and whatever so just
delete the gamestate.whatever jargon that it auto names it. After
doing that, either move that file from the SNES/State folder to where
you have your lua file, or the other way around. and then load up the
lua file into the console, and boom you're good.
IF YOU ALREADY TRIED TO RUN THE LUA FILE AND IT ERRORS: You either need to delete your save, or edit the lua file slightly. If you want to do the delete save approach, then go into the SNES folder and then into the SaveRAM
folder and delete your file for the game. THIS DOES NOT DELETE THE
EMULATION, just the save. If you want to edit the lua file, then at
the top, the very top line, (create a new one if you want to, just
make sure it's before any other text) add this: pool = nil that's it.
It will reset the data so that it can run again. You still need that
save state though. You will probably want to edit the file again after
you've started running it and remove that line or it will restart
every time you turn it on.
Alrighty, I said I'd answer this better, and sometimes people do just google randomly for their solutions.
Soo, Bizhawk emulator has a way to run Lua scripts, which is nice.
So Seth's program assumes a few things about how the game is set up, and how the user (that is you) has done certain things beforehand.
The main thing that you need to do beforehand is create what is known as a save state. This is a point in the game that you can instantly reload back to, and how the program restarts the level so that each 'run' is essentially the exact same. This differs slightly from normal games where you 'load' the game, because games back around SMB weren't as 'random' as games now. So saving the game and loading it should give the same exact result with the same inputs every time.
You should create the save state right at the very start of the level. To create this illustrious save state you want to click on the file button at the top of your screen to open the drop down, and then select save state and create a new one. This should create a save state that you can then load to return to that exact moment in the game.
To have the program be able to load your save state to run you can do one of two things
1: Rename the actual save state file name to be just DP1.savestate
2: Modify the Lua file and change the DP1.savestate part to be the name of your save state
Then you just need to move them into the same folder, and you should be golden.
If you attempted to run the file before making a save state, it will have tried to run and errored with attempt to index field 'neurons' (a nil value) or something similar. (It's been a while, it could have stopped on the first run because it couldn't find the save state, so this might just only happen on the 2nd and further runs)
What this means is that it essentially created it's "brain" but left it completely empty. Which is bad. There's two ways to fix this, and they're fairly straightforward.
1: You need to delete the actual game save, otherwise known as the SaveRAM. The file that you need to delete can be found in the folder for whatever console you're running, in Seth's video he was using the SNES, so that's the folder you'd want to go into. Inside that folder is then the SaveRAM folder, you can either just delete that folder, or go into it and delete the one for the game you were running.
2: You need to edit the Lua file to reset itself, all this requires is putting the text pool = nil at the very top. This will then delete the "brain" before anything else happens, which will let the program create a new one. Fair warning: This is not just a one time effect, if you restart the program at this point you will lose your entire progress. What you need to do is after it starts running, stop it and edit the file again, and remove the line you just added. This will stop it from deleting it's "brain" every time the program starts, and you should be able to freely run the game.
I do hope that there are still people who look at Seth's video and wants to make it run themselves, good luck to you guys, and happy gaming.
"If you are using a version of BizHawk that is over 2.0, go into the menu and Click Config then follow as such: Customize > Advanced > Lua Core > Lua+LuaINterface. This is why I wasn't able to load."
from JaRetroYT over on reddit.
Move the savestate and lua script to the main folder for the emulator (where EmuHawk.exe is)

Copy only difference (kdiff, winmerge, any diff like tool)

Is there possibility of copy ONLY difference of two files? Like in winmerge, but, I can't find this option
Just like on this screen- i want to copy only 'yellow part' . Of course I can do that manually, but in big file it's not too funny :-)
WinMerge has a built-in and simple way to generate such "diff only" files, that they called "patches".
Click on "Tool", then on "Generate Patch...", and enter where you want to store the result:
You will obtain (for your example) the file
4,8c4,8
< HELLO WORLD
< HELLO WORLD
< HELLO WORLD
< HELLO WORLD
< HELLO WORLD
---
>
>
>
>
>
That uses the standard, compact way of representing diff and is easy to manipulate.
There is a free app called DiffMerge.
Note : The option 'Show differences only' will be disabled until you switch to the bottom tab labeled Referenced View(Files as loaded). After that you should be able to use Differences Only view.
Here is how you do it in WinMerge:
Disable any context lines:
[View] > [Context] > [0 Lines].
Select pane of interest: Click on pane.
Select all text: [Edit] > [Select All] or [Ctrl]+[a].
Copy selection: [Edit] > [Copy] or [Ctrl]+[c].
In winmerge there is very nice feature- in tools you can generate raport in html by Tools-> Raport. After that operation you can parse generated html- and in that way get only differenece (but maybe it's not simplest solution)
Most diff tools have a patch generation functionality which can work toward the clipboard, this is mostly what you want as you will get only changed text on left and right side (if you remove the context lines). If you want only those of one side you can easily filter the patch with regard to the first character (removing all lines, using an editor, matching something like ^[+>].*$ to keep removed lines or ^[-<].*$ to keep added lines).
The diff tool in command line will output just that, piped with a grep and one of the above regular expression you are done.
WinMerge offers the "Copy Left to..." or "Copy right to..." that will copy only the differences to a folder of choice.

Resources