×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Forcing DWG Import Scale to Desired Value

Forcing DWG Import Scale to Desired Value

Forcing DWG Import Scale to Desired Value

(OP)
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

RE: Forcing DWG Import Scale to Desired Value

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>

RE: Forcing DWG Import Scale to Desired Value

(OP)
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

RE: Forcing DWG Import Scale to Desired Value

(OP)
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

RE: Forcing DWG Import Scale to Desired Value

(OP)
Where are you getting your commands from?  Do you know of a good reference?

RE: Forcing DWG Import Scale to Desired Value

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>

RE: Forcing DWG Import Scale to Desired Value

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources