Thursday, January 08, 2009     Register | Login | Search | Contact Us
     

Many of you already received communications about the move of the Cadence user community into cadence.com. And many of you have already joined, with over 4000 registrations in the first two weeks.

The new Cadence Community enhances the ability of Cadence users to connect and collaborate. In addition to moving the community into cadence.com -- enabling single sign-on for community, Sourcelink and Cadence events -- the new site is organized around nine technology segments, giving you easy access to product information, training, forums and blogs. Some of the new features include:
  • Ability to respond to posts via e-mail
  • Technology-specific blogs
  • Latest Web 2.0 social networking capabilities
  • Public profile options
  • Private messaging
  • Friends lists
Visit the new Cadence Community today at www.cadence.com/community and join the discussions!

Registration note: Due to the scope of the enhancements and the new SSO registration system, we were not able to migrate existing cdnusers.org member accounts. So new registrations are required, but this enables a broader set of functionality we think you'll enjoy.

Forum note: Under the guidance of forum moderators, we have taken the 20+ cdnusers.org forums and consolidated them into 11 forums on the new site. Posts have been brought over so you can leverage that posting history. CDNusers forums will be set to read only starting 7/30, and cdnusers.org will be redirected to the new community on 8/4.

Best regards,
Mike and Tom

Michael A. Catrambone - Steering Committee Chairman
Distinguished Engineer
PCB/Mechanical
UTStarcom, Inc.

Tom Diederich
Cadence Community Manager
Home
Forums
Subject: Adding text blocks
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
Dave Elder
Moderator
Posts: 150
Online: User is Offline
2/28/2006 12:48 PM  
Does anyone know how to add new text blocks in Skill without calling a script? I am running an interactive command so calling a script is not an option.
axlSetParam doesn't allow me to add a text block although I can alter existing text block parameters this way (despite the documentation).

Dave Elder
Tait Electronics
AshCan
Posts: 20
Online: User is Offline
2/28/2006 9:14 PM  
Don't know if you can do it directly with Skill. But perhaps you can have your Skill function fprintf the script you need, execute the script using an axlShell call and then get rid of the script file.
leonlee
Posts: 81
Online: User is Offline
2/28/2006 9:58 PM  
I'm looking for this function too~~~ 

Leon Lee
Schneider-Electric
Dave Elder
Moderator
Posts: 150
Online: User is Offline
3/01/2006 11:41 AM  
Thanks, That's what I do. However it doesn't work within an interactive function and I can't use "general" because I get too many crashes. I may have to revert to creating text by drawing lines. Ugly!

Dave Elder
Tait Electronics
natebizu
Posts: 0
Online: User is Offline
3/01/2006 12:13 PM  

I don't know if this will work in an interactive command but you might want to try,

  1. Export a plot file containing recognizable text
  2. Import the plot file scaled (this will create new text blocks)
  3. Find the recognizable text
  4. Get the text block number of the text
  5. Modify text block as needed

Of course all of this needs to be done using scripts...


Another way could be to use a script to change the text block and put a command to restart your interactive procedure. (The trick is finding a way to save your data from one instance of the command to the other using attachments)

leonlee
Posts: 81
Online: User is Offline
3/02/2006 6:53 PM  
yes, we can add new textblock by inporting scaled plot file.
But the max textblock number is 64.
And, if you modify an existed textblock, you will destroy this kind textblock's text.

Leon Lee
Schneider-Electric
J.C. Roberts
Posts: 11
Online: User is Offline
3/15/2006 1:44 AM  
Programatically adding text blocks looks simple but actually is a slightly convoluted process. You only need one function but you need five arguments for it.

(axlDBCreateText
    YourTextData                ;The text you want to write
    XY_Location                  ;Where you want to write the text
    OrientationStructure      ;Formatting for the text block
    LayerToWriteON           ;The layer where the block is written
   nil)                                  ;Attach the text to an object

The slightly convoluted part is the OrientationStructure. You have to know about the super secret (make_axlTextOrientation...) function for the required structure.

(setq OrientationStructure
    (make_axlTextOrientation
       ?textBlock "3"               ;see your text block definitions
       ?rotation 0                    ;degrees of rotation
       ?mirrored nil                 ;mirror left-right (i.e. for bottom layer)
       ?justify "LEFT"))           ;text justification

You can get real fancy with this sort of thing. For example, I've got code for working with symbols, namely making them presentable (PDF) for client approval. It writes the part name, the IPC footprint  name, the number of padstacks used, the number of pins on the device, copyright statement and occasionally dirty jokes into the part drawings (*.dra).

The symbol validition programs will (eventually) be added to the DesignTools project as soon as I find the time.


Kind Regards,
JCR

--
Free, Open Source CAD, CAM and EDA Tools
http://www.DesignTools.org
J.C. Roberts
Posts: 11
Online: User is Offline
3/27/2006 4:50 AM  
Have you ever reread one of your own answers, only to realize you answered the WRONG question?

I'm such an idiot. My appologies for the previous post.

textBlocks are C-structs (a.k.a "user defined objects"), are read only by default and in general, there is no public SKILL interface for creating them.

There is a way around the problems and you can create textBlock objects programatically in SKILL but the way to do it is highly convoluted.

Dave said, "I am running an interactive command so calling a script is not an option."

Actually, it is an option. The way this is done is you write a script file, execute the script file in the background in another instance of allegro, and then reload the database in your current instance.

The script file does the work you want (adding a textblock), saves the database and exits. A second instance of Allegro is launched in -nographic mode along with the script through the (axlRunBatchDBProgram...) function in your first instance, so you never see the second instance. When the second instance is finished, the first instance of Allegro reloads the database and continues execution of your SKILL program.

The only problem with this approach is that for that short time while the second instance of Allegro runs in the background, you have two licenses checked out.

The attached code adds a single textBlock to your database. Also, this same method is useful for deleting all those unwanted layers from parts (*.dra) when they've been dumped from a board.

kind regards,
jcr

Attachment: DT_textblock.zip


--
Free, Open Source CAD, CAM and EDA Tools
http://www.DesignTools.org
Posting to forums is available to community members only.
Login or Register



ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.