CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 03-19-2003, 07:13 AM
Steve Steve is offline
Registered User
 
Join Date: Mar 2003
Location: Alabama
Posts: 309
how to edit the am_customize file?

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
Reply With Quote
  #2  
Old 03-19-2003, 08:16 AM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
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.
__________________
John Scheffel
Reply With Quote
  #3  
Old 03-20-2003, 12:31 PM
Gary Brauch Gary Brauch is offline
Registered User
 
Join Date: Oct 2002
Location: Colorado
Posts: 220
Use WordPad

Use WordPad to edit your am_customize and it works fine.
Gary.
Reply With Quote
  #4  
Old 03-25-2003, 07:36 AM
Steve Steve is offline
Registered User
 
Join Date: Mar 2003
Location: Alabama
Posts: 309
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
Reply With Quote
  #5  
Old 03-25-2003, 07:46 AM
Gary Brauch Gary Brauch is offline
Registered User
 
Join Date: Oct 2002
Location: Colorado
Posts: 220
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.
Reply With Quote
  #6  
Old 03-25-2003, 07:50 AM
Steve Steve is offline
Registered User
 
Join Date: Mar 2003
Location: Alabama
Posts: 309
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
Reply With Quote
  #7  
Old 03-25-2003, 08:07 AM
Steve Steve is offline
Registered User
 
Join Date: Mar 2003
Location: Alabama
Posts: 309
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
Reply With Quote
  #8  
Old 03-25-2003, 08:40 AM
Steve Steve is offline
Registered User
 
Join Date: Mar 2003
Location: Alabama
Posts: 309
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
Reply With Quote
  #9  
Old 03-25-2003, 09:14 AM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
Quote:
Originally posted by Steve
So how do I make the font hp_i3098_c.fnt load automatically?
Try this in your am_customize file.
Code:
(sd-execute-annotator-command :cmd "LOAD_FONT 'hp_i3098_c")
__________________
John Scheffel
Reply With Quote
  #10  
Old 03-25-2003, 12:09 PM
Steve Steve is offline
Registered User
 
Join Date: Mar 2003
Location: Alabama
Posts: 309
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
Reply With Quote
  #11  
Old 03-25-2003, 01:00 PM
Steve Steve is offline
Registered User
 
Join Date: Mar 2003
Location: Alabama
Posts: 309
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
Reply With Quote
  #12  
Old 03-25-2003, 02:19 PM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
Quote:
Originally posted by Steve
How do I remove the default frames from the list?
Try using this command before you register your frames.
Code:
(docu:docu-unregister-frame-all)
__________________
John Scheffel
Reply With Quote
  #13  
Old 03-26-2003, 05:31 AM
Steve Steve is offline
Registered User
 
Join Date: Mar 2003
Location: Alabama
Posts: 309
Hey, that did the trick!

We now have FORMATS, ladies and gentlemen!

Steve
Reply With Quote
  #14  
Old 03-26-2003, 09:02 AM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
Quote:
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.
__________________
John Scheffel
Reply With Quote
  #15  
Old 03-27-2003, 05:29 AM
fabrizio fabrizio is offline
Registered User
 
Join Date: Jan 2003
Location: Parma - Italy
Posts: 34
Quote:
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:22 PM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.