PDA

View Full Version : how to edit the am_customize file?


Steve
03-19-2003, 07:13 AM
I have located the am_customize file on my system, but when I open it with notepad I can see what I think are carriage returns. Is this document safe to edit on Windows 2000 with notepad?

I have all my drawing formats created in ME10 and stored in .mi format. I have imported one into Annotation and saved it as a frame. Now I want it to show up in my list of frames to use, which is why I am editing the am_customize file. Is this the right approach?

Steve

John Scheffel
03-19-2003, 08:16 AM
The problem is that am_customize, like many files that come with CoCreate applications, uses UNIX standard control characters for separating lines. Windows uses the DOS standard, which is the only one that NotePad supports. You should be able to edit the file using WordPad, which works for both UNIX and DOS text files.

Another option is to get a better third party text editor. If you do a lot of text file editing I would highly recommend this. I like TextPad which can be downloaded from www.textpad.com. It is shareware, so you can try it for a while but may eventually want to register (I think about $30). With it you can load UNIX text files, edit them, then when you save choose either UNIX or DOS standard. Textpad has lots of features and can be customized to some extent. It includes simple bracket matching, which can be handy to make sure all your parenthesis are in order when working with LISP.

If you come from the Unix world and like vi, you might want to checkout vim from www.vim.org. It is a vi like editor for Windows that also support some "PC like mouse functions" in addition to standard vi keyboard commands.

Another editor I have heard good things about is EditPad from Just Great Software. It can be obtained from www.jgsoft.com. I have never tried it myself since I am happy with TextPad.

Gary Brauch
03-20-2003, 12:31 PM
Use WordPad to edit your am_customize and it works fine.
Gary.

Steve
03-25-2003, 07:36 AM
Ok, I have downloaded TextPad and used it to edit my am_customize file.

I have added the following line to it:

;; (docu::docu-register-frame :ui-name "MILTOPE-D1" :file "C:\D1_FRAME.mi")

I have opened my ME10 drawing format, and saved it as a frame file c:\D1_FRAME.mi.

Yet when I create a new drawing, the frame is not there to be chosen. What have I done wrong?

Also, I notice that the syntax for the rest of the frame entries includes a :wm-name field. What is that for? Do I need one? If I use it, does it mean the frames are stored in WM and not locally on the file system?

Thanks!

Steve

Gary Brauch
03-25-2003, 07:46 AM
Steve,
Remove the semi colons from in front of the line. This comments the line out so that it won't be read.

Your command is correct, don't worry about the WM-name unless you are using WorkManager.
Gary.

Steve
03-25-2003, 07:50 AM
Thanks for the quick reply.

I am using Work Manager. Do I need to worry about it now? :)

I will remove the ;; and see what happens. Strangely, all of the other commented-out frames (A1, A0, A, B, etc.) that seem to have come with Annotation /do/ show up though.

Steve

Steve
03-25-2003, 08:07 AM
woohoo!

I got my format to show up and come in. It was removing the ;; that did the trick.

OK: Next problem.

Some of the text on the format comes in as boxes. Presumably because the needed font, hp_i3098_c.fnt is not loaded by default. If I go Text > Load Font I see the font to choose from, and when I load it the text changes from boxes to the correct words.

So how do I make the font hp_i3098_c.fnt load automatically?

I bet it's in am_customize somewhere...off to poke around...

Thanks!

Steve

Steve
03-25-2003, 08:40 AM
sigh....

I'm not sure how I sucessfully exported my first format, but I don't seem to be able to do it again.

I have opened an existing ME10 format by using Load > Import 2D, and I have the format open in annotation.

I use Save, type Frame, and I give it a file name and select sheet 1 (even though it already says "1" as selected, since there is only one sheet).

The file save dialog goes away without an error, but no file is created. Ideas?

Steve

John Scheffel
03-25-2003, 09:14 AM
Originally posted by Steve
So how do I make the font hp_i3098_c.fnt load automatically?
Try this in your am_customize file.
(sd-execute-annotator-command :cmd "LOAD_FONT 'hp_i3098_c")

Steve
03-25-2003, 12:09 PM
OK, I have converted all of my ME10 drawing formats into frames. I used the following steps:


Steve,

Let's give this a try. I found the note I was looking for that will walk you through saving a border as a frame. You may want to read through this first, then print it off and follow along...might be easier than going back and forth.

Hope this helps. Let me know how it goes.

Regards,

Doug

===============================================================================
Procedure to Register a Custom Border as a new Frame

1) Bring in .mi file with customers border
2) Save file under a new name (as we are about to modify the original file!)
3) Delete all views from the sheet, leaving only the border
4) Load the functionality Migration Tools
* in your command line type the command - (docu-enable-migration-tools)
* you will see a new menu selection entitled Migr Tools
5) Select the menu Migr Tools - Convert Objects - Sketch
* a pop up menu appears to convert a Sketch to Frame
* select your drawing border in the viewport
* a pop-up menu appears "The Current Frame will become a sketch" select 'Continue'
* hit ok
6) Save this file in the Frame.mi format to a file location that you will recall later
7) In a Windows Explorer, find your am_customization file (path similar to mine)
D:\Program Files\SD 11.0a\CoCreate\SolidDesigner 11.0.1.1\personality\sd_customize\Annotation
* open this file in Wordpad
* search the field until you find this statement
;; register standard frame sizes for recognition during migration (A..E,A0..A4)
8) you will need to register this frame which will require you to add some code similar to what I have provided in
the example below:
;*********** register another frame for border **********************************
(docu-register-frame :ui-name "Cust_Border" :file "Z:/temp1/new_border.mi")

================FYI: You can find this same information in our help files ===============================================

To register a new frame type, copy the function docu-register-frame from the am_customize file,
and enter the required names:
(docu-register-frame :ui-name "Name that appears in the Annotation interface" :file "Path and filename of frame")

For example:
(docu-register-frame :ui-name "A4" :file "/frames/format_A4")
========================================================================================================
9) Close down Annotation and restart Annotation. This will enable Anno to grab the new code you just put in your am_customize file.

10) Pull up customers drawing. To create a new sheet:
Drawing - Create Sheet - Sheet - Frame <<select the pull down menu and find your 'name' that you added in step #8. Hit ok, this will create a new sheet with your customers border as the format.


And I edited my am_customize file like so:


(docu::docu-register-frame :ui-name "MILTOPE-A1-1" :file "c:\formats\a1.1.mi")
(docu::docu-register-frame :ui-name "MILTOPE-A1" :file "c:\formats\a1.mi")
(docu::docu-register-frame :ui-name "MILTOPE-A2" :file "c:\formats\a2.mi")
(docu::docu-register-frame :ui-name "MILTOPE-B1" :file "c:\formats\b1.mi")
(docu::docu-register-frame :ui-name "MILTOPE-B2" :file "c:\formats\b2.mi")
(docu::docu-register-frame :ui-name "MILTOPE-C1" :file "c:\formats\c1.mi")
(docu::docu-register-frame :ui-name "MILTOPE-C2" :file "c:\formats\c2.mi")
(docu::docu-register-frame :ui-name "MILTOPE-D1" :file "c:\formats\d1.mi")
(docu::docu-register-frame :ui-name "MILTOPE-D2" :file "c:\formats\d2.mi")
(docu::docu-register-frame :ui-name "MILTOPE-E1" :file "c:\formats\e1.mi")
(docu::docu-register-frame :ui-name "MILTOPE-E2" :file "c:\formats\e2.mi")


Problem is, every time I try and use on of the frames (and they do show up in the drop-down list of frames) I get a window that pops up with the following error:

Without an active sheet, it is not possible to create views.

What does this mean, and how do I fix it?

Steve

Steve
03-25-2003, 01:00 PM
OK I fixed the problem.

The problem is that the am_customize file needs file paths to use forward slashes "'/" and not backslashes "\", even on a Windows system.

Next question:

In the Frame Drop-down menu, I can now see, and select, all of my newly added frames.

However, I still see the "default" frames (A0-A4, A-E). In the am_customize file they are commented out with ";;" at the beginning of the line.

How do I remove the default frames from the list?

Steve

John Scheffel
03-25-2003, 02:19 PM
Originally posted by Steve
How do I remove the default frames from the list?
Try using this command before you register your frames.
(docu:docu-unregister-frame-all)

Steve
03-26-2003, 05:31 AM
Hey, that did the trick!

We now have FORMATS, ladies and gentlemen!

Steve

John Scheffel
03-26-2003, 09:02 AM
Originally posted by Steve
The problem is that the am_customize file needs file paths to use forward slashes "'/" and not backslashes "\", even on a Windows system.
In both Modeling and Drafting it is safest to use forward slashes in file paths, which seem to work for any operating system. Backslashes also seem to work in Drafting under Windows. You can use backslashes in your LISP files, but you have to double them such as "\\". I think the backslash is a special character. You have to use two of them to get one in your file paths.

fabrizio
03-27-2003, 05:29 AM
Originally posted by John Scheffel
You have to use two of them to get one in your file paths.

Yes, you're right John. Backslash is a LISP "escape character". More or less, it means "take the character following me as is". So the interpreter does not give any "special meaning" to any char following '\'. The typical example you see on manuals is how to create a LISP string which contains only the character double quotes. If you write
(setq my-string """)
you get an error because the second double quote is interpreted as the string-closing char and the third opens a new string which is never closed. So the right way to obtain that would be:
(setq my-string "\"")

This is also the reason because if you try to open a file in this way:
(setq my-stream (open "C:\tmp\mydata.txt"))
the file is not found. In fact that would be the same of writing:
(setq my-stream (open "C:tmpmydata.txt"))
and that file probably does not exist.
If in a string you write "...\\..." the first backslash is the escape char and means "take the following backslash as is, and NOT as an escape char".

But probably this is only philosophy, the important thing is to remember to always use \\ OR / (the default file separator in LISP) to define a file path.

Regards.
Fabrizio

Wolfgang
03-27-2003, 12:56 PM
regarding load font:

He Steve,

you are a beginner, that' ok..

Did you heard of the "RECORDER".. goto:
<sddir>help/common/goodies/Readme.html

it's a useful tool..

activate it, start recording
goto text menu, font load, choose font
stop recording

now something like
am_load_font :fontfile "c:/program.... .fnt" complete

is written into the recorder file

a) you can simple include this recorder file into you am_customize file with a (load "filename.rec")

b) just copy and paste the sequence needed
(am_load_font :fontfile "c:/program.... .fnt")


this is the recorded UI sequence you used then

the advantage compared to the (sd-execute-annotator-command... sequence John posted is, that the ranges, where you simple select a font, is than updated, too (e.g. texts, dimensions..)

Wolfgang
03-27-2003, 01:08 PM
regarding:
Without an active sheet, it is not possible to create views.
and
Backslash is a LISP "escape character"

because of the backslash '\' in
(docu::docu-register-frame :ui-name "MILTOPE-A1" :file "c:\formats\a1.mi")
the 'load frame for new sheet' could not find the frame file.. therefore the frame is not loaded.. but without a frame no sheet is created.. without a sheet created you do not have an active sheet (any more).. and then finally ;) the message you saw is displayed.

Just to give you some background, to see the connections from one to the other.

HTH


and finally..
if you like to have your new frames really inside DDM then have a look to
<sddir>\help\common\DesignManagement\Annotation\english\wmam_cust.html
this will help..
But for the moment continue with the customization without DDM.. there are enough things to have fun with :)

jlkehn
07-15-2011, 08:25 AM
I'm having trouble following this; I have v17 and have tried modifying the am_customize and the am_wm_customize. also I have both files in 2 different locations.
programs/cocreate/cocreate modeling 2008/personality/sd_customize/annotation/ &
programs/cocreate/cocreate modeling 17.0/personality/sd_customize/annotation/

also the native file that is in there is a file type "file" and after saving the file it ends up being a "txt" file type. if this is a problem, I don't know how to save/edit that. I'm also using windows 7 opererating system.

it appears that the am_customize file does not have anything in regards to the frames while the am_wm_customize file has references to the frames. I don't see any file location for them in the original file. I have tried putting ";;" in front of them to delete them from the list with no luck.

I also noticed that I have /program files (x86)/cocreate/... I think these are mostly library stuff though, I think.

help