Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forcing DWG Import Scale to Desired Value 1

Status
Not open for further replies.

treddie

Computer
Dec 17, 2005
417
Howdie all.

Was wondering if there was a way in ProE to force the Scale Rotate dialog box for .dwg import, to default to a static value that remains the same for every import into Sketcher? I typically import a lot of .dwg files for sections, and it is such a pain having to re-input the same scale every time. The best I can do now is create an empty folder on my desktop with the name "_ .0393701", so that I can quickly grab that scale value by copying the folder name to the clipboard. That way I don't have to remember that value every time I open a sketcher session requiring .dwg imports. But it still requires that workaround every time I import stuff, especially if I've recently used the clipboard for something else, and have to go BACK to that folder on the desktop to recopy the value to the clipboard. Can't find anything in the ProE options that might make this possible.

Thanks again as always!
Tom Reddie
 
Replies continue below

Recommended for you

Mapkey? Here's one from 2001.
mapkey sr @MAPKEY_LABELscale_rotate;~ FocusIn `scalerotate` `ScaleInput`;\
mapkey(continued) ~ Update `scalerotate` `ScaleInput` `.0393701`;\
mapkey(continued) ~ FocusIn `scalerotate` `RotateInput`;\
mapkey(continued) ~ Activate `scalerotate` `RotateInput` `0`;

Note, when you select section data from file, the focus is set to the scale box so before you can enact the mapkey, you'll need to click on the graphics window. Then you can type 'sr'...

<tg>
 
Oh man, how could I be so stupid! I use mapkeys for such things as Default folders, cancelling a session, etc. I don't know why I didn't think of that.

Thanks for resetting my brain, telecomguy.

treddie
 
Your method goes quite abit deeper though, than my prior Mapkey usage. In a very programming sense, like VB or something, where you make reference to the dialog box as an object.

treddie
 
Where are you getting your commands from? Do you know of a good reference?
 
This is just what the mapkey editor generated. The following assumes you've not ever created a mapkey so please ignore if I'm oversimplifying...

After you select the dwg file to use as a sketch, the sketch displays and the "Scale Rotate" dialog box pops up.

Then go to Utilities; Mapkeys
In the Mapkeys dialog, select New
Set the Key Sequence to be 'sr' or whatever you want to call it
Give the Mapkey a name so you can quickly identify it in you configuration file
Click Record (now you need to not make any stray mouse clicks or else you'll clutter up your mapkey code)
Select the Scale field and give it your scale factor
Select the Rotate field and give it your rotation
Hit 'enter' so it will apply the changes (don't place the sketch nor click the check mark)
Now press Stop and OK in the Record Mapkey dialog box.
In the Mapkeys dialog, select Save and save the changes to your Config.pro file (or wherever you store your mapkeys).

Now if you go look at the contents of your config.pro, you should see something along the lines of the mapkey I posted earlier.

Good luck,
<tg>
 
I actually did it that way last night, which worked. But I wanted to experiment with the OS Script route, but couldn't get it to work, even though my code (generated by Mapkey)matched yours. I wonder if it's because OS scripts are OS dependent, where the "script" generated by ProE Mapkey is ProE dependent.

Anyhoo...thanks again telecomguy!

treddie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor