Exporting Annotations through IAC
Using Acriobat Pro XI, I am using the following WinBatch routine to try to export comments (annotations) to an FDF file from an open PDF document:
fdfer="C:\temp\test.fdf"
AcroApp = ObjectCreate("AcroExch.App")
AvDoc = ObjectCreate("AcroExch.AVDoc")
PdDoc = ObjectCreate("AcroExch.PDDoc")
FormApp = ObjectCreate("AFormAUT.App")
AvDoc.Open(fdfer,"")
AcroApp.Show()
; wait for user to press a button
fds = FormApp.Fields
fds.ExportAsFDF(fdfer, "", "False",)
Exit
An fdf file is created but it is empty, although the document contained annotations.
Looking at the SDK, it appears that the IAC "ExportAsFDF" method does not have a parameter allowing for the export of annotations:
void ExportAsFDF (LPCTSTR bstrFullPath, LPCTSTR bstrSubmitButton, BOOL bEmptyFields, const VARIANT& arrFields);
even though its javascript counterpart does (bAnnotations).
I would appreciate any advice that might allow me to work around this problem.
Mike
Your reading of the SDK sounds correct. The IAC methods are very, very old and frozen, while JavaScript is still being added to. So... use JavaScript instead. Take very careful note of the security warnings in the text and quick box for the method, it often stops it being used as you want to.
Similar Messages
-
Access to fields of a form through IAC
Hello everyone!
I created with Adobe LiveCycle Designer ES2 (included with Adobe Acrobat X Pro) an example form with several fields.
After that I wanted to access the fields through the Acrobat SDK's Interapplication Communication (IAC) capability by using OLE.
As programming language I choose C# from the .NET framework. But the only field that I could access was the signature field and only when it was signed. I could not figure out the mistake. Is my code wrong? Or is the created form wrong? Can somebody help?
The code that I used:
Acrobat.AcroApp app = null;
Acrobat.AcroAVDoc avdoc;
AFORMAUTLib.AFormApp formApp;
AFORMAUTLib.IFields fields;
app = new Acrobat.AcroApp();
avdoc = new Acrobat.AcroAVDocClass();avdoc.Open(@"Form.pdf", null);
formApp = new AFORMAUTLib.AFormApp();
fields = formApp.Fields;
int fieldsCount = fields.Count;
foreach (var item in fields)
AFORMAUTLib.IField field = (AFORMAUTLib.IField)item;
result = field.Name + " = " + field.Value + "[" + field.Type + "]";Yes, if the form is Reader Enabled, then a Reader user can add a graphic as the icon of a button via scripting to an AcroForm.
From: Adobe Forums <[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
Date: Tue, 27 Sep 2011 00:31:26 -0700
To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
Subject: Access to fields of a form through IAC
Re: Access to fields of a form through IAC
created by gatch<http://forums.adobe.com/people/_gatch_> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3939773#3939773 -
How to export annotations in acrobat professional 10?
is there any way to export annotations in acrobat professional 10? This feature was there in acrobat 9.
Please do reply ...Its urgent.In the Comment toolpane on the right:
In the comment list, click the last button (Options). Here you'll get all export options. -
How to sign PDF with a smart card or USB token in C# through IAC ?
Hi,
My goal is to apply a certification signature (MDP) to a PDF document with a smart card (Belgium identity card) from a C# application.
I start Acrobat through IAC.
The JavaScript object apparently can only sign with PKCS12 file (.pfx)...
To sign a PDF with a smart card I need to develop a plug-in if I am right?
The samples in the SDK are to get a certificate from the windows certificate store or to write a Third party handler.
I already get the certificate context (an HCRYPPROV object from windows certificate store)
How can I create a signature field but mostly sign it? With DigSig I guess, but I’m lost in the API… does
I have to use DigSigSignDoc ?
Syntax : void DigSigSignDoc(PDDoc pdDoc, CosObj sigField, ASAtom filterKey)
The filterKey value for the windows certificate store is “Adobe.PPKMS” but how can I choose my certificate?
I also have to build a signature reference dictionary i guess?
What does i have to do and in which order? I can't find any documentation on this.
There is a more simple way?
Thank you,
Goffin
FabianHi,
-download the JDK sample "sdkAddSignature.js"
-change the sign methode like this :
Sign = app.trustedFunction (
function( sigField, DigSigHandlerName )
try {
app.beginPriv();
//the diSigHandler is "Adobe.PPKLite"
var myEngine = security.getHandler(DigSigHandlerName);
var ids = myEngine.digitalIDs;
//choose an id which is installed in the microsoft store
var oCert = ids.certs[3];
// for (var i=0; i<ids.certs.length; i++)
// console.println("certificat n°"+ i + " " +ids.certs[i]);
var oParams = {cPassword:"0000" , oEndUserSignCert:oCert }
if(myEngine.login({cPassword:"0000",oParams:oParams,bUI:false}))
console.println("OK");
else
console.println("Error");
console.println("sigfield :" + sigField);
sigField.signatureSign({oSig: myEngine,oInfo: { password: "0000",reason: ACROSDK.sigReason,location: ACROSDK.sigLocation,contactInfo: ACROSDK.sigContactInfo}});
app.endPriv
} catch (e) {
console.println("An error occurred: " + e);
-perform some test using the javascript debugger
-and finally use IAC to execute the script -
Place link annotations with IAC
Hi together,
I want to place 'invisible' rectangle annotations on drawings, which link to other drawings (pdf). This is to be done using OLE Automation of the Acrobat Interapplication Communication. I already succeeded in doing so with a plug-in, but I need to do it from outside Acrobat. In the IAC OLE API I miss some essential methods. To illustrate this here is my code of the plug-in (C++):
void PlaceLink(int iLeft, int iTop, int iRight, int iBottom, CString cstrFileToOpen)
AVDoc avDoc = AVAppGetActiveDoc();
PDDoc pdDoc = AVDocGetPDDoc(avDoc);
PDPage page = NULL;
PDAnnot annot,linkannot;
//Create an ASFixed object and define its borders
ASFixedRect fr;
fr.left = ASInt32ToFixed(iLeft);
fr.top = ASInt32ToFixed(iTop);
fr.right = ASInt32ToFixed(iRight);
fr.bottom = ASInt32ToFixed(iBottom);
PDLinkAnnotBorder frBorder;
frBorder.width=0;
//Create a PDPage object
page = PDDocAcquirePage(pdDoc, 0);
//Create a PDAnnot object and
//Cast the PDAnnot object to a PDLinkAnnot object
annot = PDPageCreateAnnot(page, ASAtomFromString("Link"),&fr);
linkannot = CastToPDLinkAnnot(annot);
//Set the border and the action, then add it to a page
ASAtom pathType = ASAtomFromString("Cstring");
ASFileSys fileSys = ASGetDefaultFileSysForPath(pathType,cstrFileToOpen);
ASPathName pathLaunchFile = ASFileSysCreatePathName(fileSys,pathType,cstrFileToOpen, NULL);
PDFileSpec laFile = PDFileSpecNewFromASPath(pdDoc,fileSys,pathLaunchFile,NULL);
PDAction linkAction = PDActionNewFromFileSpec(pdDoc,ASAtomFromString("Launch"),laFile);
PDLinkAnnotSetAction(linkannot,linkAction);
PDLinkAnnotSetBorder(linkannot, &frBorder);
PDPageAddAnnot(page,-2,linkannot);
In comparison here is my code for IAC OLE so far (C#):
private void btnStart_Click(object sender, EventArgs e)
Acrobat.AcroAVDoc avBaseDoc = new Acrobat.AcroAVDoc();
avBaseDoc.Open(strBasefile, strBasefile);
avBaseDoc.BringToFront();
Acrobat.AcroPDDoc pdDoc = avBaseDoc.GetPDDoc() as Acrobat.AcroPDDoc;
Acrobat.AcroPDPage pdPage = pdDoc.AcquirePage(0) as Acrobat.AcroPDPage;
Acrobat.AcroRect anRect = new Acrobat.AcroRect();
anRect.Left = 100; anRect.Top = 100;
anRect.right = 300; anRect.bottom = 200;
Acrobat.AcroPDAnnot pdAnnot = pdPage.AddNewAnnot(-1, "Link", anRect) as Acrobat.AcroPDAnnot;
In comparison there are some essential methods/properties I have not found until now:
- setting the border to 0 (PDLinkAnnotSetBorder(linkannot, &frBorder) and PDLinkAnnotBorder at all)
- setting the action and file to launch (PDLinkAnnotSetAction(linkannot,linkAction), PDActionNewFromFileSpec(pdDoc,ASAtomFromString("Launch"),laFile)) and PDAction at all)
My impression is, that there really aren't such methods and it seems not to be possible to place link annotations with IAC OLE. But before I give up, maybe I'm only blind, I want to ask other developers, wether they can comfirm this. (Any Adobe staff is also welcome to give an answere)
Thanks in advance
RolfThanks Leonard,
now I know for sure, that I have to put my effort in looking for alternatives, such as you described.
In the meantime I have found another alternative: using the jsObj.
Currently I succeeded in placing the link and setting simple actions like going to the next page. Next thing I have to find out is, wether it is possible to open another PDF via JS or if there are some security issues to be taken into account...
Thanks again and have a great day
Rolf -
Export annotations out of pdf file
Hey.. There is someone out there that could suggest me an app to export all my annotation marks out of a PDF file?
Hi Mate,
How about maintaing form title in form properties.
Since you know how to parth the inbound pdf and fetching date.
you can searcjh for the title from the below tags using script.
<desc>
<text name="version">8.2.3.4195.1.572397.541997</text>
<text name="title">Form1.1</text>
</desc>
hope this might help.
Cheers,
Sai -
Exporting imovie through AVDV converter box?
I have been using either export or share to send finished videos through a converter box and into a VCR for years with no problem. When trying to export the latest project, it jumps in pieces and freezes up. It plays fine in imovie but can't export. I tried changing the preferences to play through camera and do it that way, and it still freezes. I have 1 gig of Ram. Any thoughts? This is for a high school video production class.
Thanks
emac Mac OS X (10.4.6)Thanks- I did read the post you noted prior to making my post. Unfortunately, nothing in that post helped me resolve my issue. My ADVC300 is recognized just fine by iMovie. Just when I go to Export or "Share", I no longer receive the message about 'the converter' box. As a result, iMovie simply times out. Any other advice?
-
Invoke adobe actions through IAC OR Invoke SaveAsOptimize
Hello,
My Requirement :
We scan a lot of patient documents and need to optimize the same. I have Adobe Acrobat X Pro.
I figured out a way to save a document as optimize and it works just fine and reduces the file size to a great extent.
I also figured out to write action to make Pro point to a input folder optimize all pdfs in the folder and output the optimized files to the output folder.
But now I want to automate this process to eliminate human effort.
I have read many posts on the forum, but didn't get anser to my requirement.
Question :
1. How can I invoke the action written in Adobe? Be it through command prompt or programmatically using Adobe's IAC.
2. Can I use Adobe SDK to save a pdf as optimized?
Found similar threads on the forum, but neither is answered:
http://forums.adobe.com/message/1161543#1161543
http://forums.adobe.com/message/2197348#2197348
http://forums.adobe.com/message/1157865#1157865
Please advise.
Thanks,
Abhijit S RajeManeHi Irosenth,
thanks for your reply.
Can I use the sdk in .net, can you please shed some more light on the same?
Is there is any sample code to demonstrate pdf file optimization in .net?
Thanks,
Abhijit S RajeMane -
How to export annotated PDFs to Dropbox?
How do you export the annotated PDFs saved on the iPad to drop box?
I actually came here looking for a place for a feature request: Dropbox integration... That would make all of this easier.
For now, I use ifttt.com A web service (free) that links other web services with "recipes".
Essentially, I set up a recipe such that I send a PDF as an attachment from the Adobe Reader iPad app to a specific email address, then the attachment is save in a particular folder in my Dropbox (specified in the body of the email). Clunky, but it gets the job done (there used to be a service "sendtodropbox" that set up an email address for ones' dropbox but I couldn't get it to work). This method at least allows sorting the documents with email body text.
The annoying part is when I want to then continue to read the document on my iPad after I have done some annotating in another version of Reader... I have to make sure the most updated version is in Dropbox (or email it to myself), do "Open in..." all over again, and delete the extra copy of the document.
again, Dropbox integration for this app would make my life soooo much easier. -
Export/Import through R3SETUP.EXE
Dear All,
I am currently running on SAP 4.6C SR2 with 4.6D Kernel on SQL Database. The Dtabase size is 2 TB.
I wish to Export/Import the Database through R3Setup.EXE.
Can anybody help me with steps to do the same & other considerations to be kept in mind.
I need to split Database fiels in 20 equal files.Hi,
check following document Chapter 8 R3load procedure on windows
https://websmp206.sap-ag.de/~sapdownload/011000358700002949502001E/R3HOM.PDF
regards,
kaushal -
Retaining Annotations through New Versions of a PDF
I take care of a published PDF here in my office.
We publish new versions of this 800 page document a couple of times a year. I've received inquiries regarding people's annotations of this document. When we release a new version, they would like the ability to import any old annotations made on the previous version of the document to the new version. Is this possible?With the appropriate applications, comments in a PDF can be brought into the source authoring file and incorporated.
Once done, the new content can be passed back out to PDF. This makes folding in "late arrivals" much easier.
To paraphrase Adobe's Ali Hanyaloglu:
This works best if the PDF documents are tagged, ideally created using something like PDFMaker for Microsoft Office
and other applications, or when exporting to a Tagged PDF from Adobe FrameMaker or Adobe InDesign.
FrameMaker 8/Acrobat 8 Pro or 8 3D
FrameMaker 9/Acrobat 9 Pro or Pro Extended
InDesign/Acrobat 9 Pro or Pro Extended
MS Word (XP) or better with the appropriate Acrobat Pro (Adobe PDFMaker, provided by Acrobat Standard or Pro is only compatible with a specific "band" of MS Office releases.
See: http://blogs.adobe.com/pdfitmatters/2008/12/version_compatibility_of_acrob.html
A starting point tutorial for Word/Acrobat (link is to an excerpt form Donna Baker's book "Adobe Acrobat 7 In the Office" - she has a similar book for Acrobat 8 & I believe for Acrobat 9).
http://www.adobe.com/designcenter/acrobat/articles/acr7sdexprtcmnt.html
More information is available via a web search on "migrate pdf comments to <ms word or framemaker or indesign> site:adobe.com"
If, on the other hand, all you want/need is an archived PDF file containing all comments with indicators of what, in the page content, has a comment or markup then look at Acrobat's Comments List and Comments Summary Reports.
Be well... -
Cisco 831 no netflow export packets through IPSEC
I have cisco 831 in remote office. Remote office is connected to Central Office through IPSec tunnel. I has configured netflow export from sorce address Lan interface (inside interface) remote office to Server central office. But I did not see netflow packet in central Office at netflow server. May be somebody fixed the problem ?
Check 'ip route-cache flow' cmd enabled on tunnel interface.
also check this bug-id:CSCef28662.
Try this link:
http://www.cisco.com/en/US/tech/tk812/technologies_white_paper09186a008022bde8.shtml#wp1002626 -
Export mappings through OMB plus
Hi All,
We have developed 125 mappings across 10 modules. I wanted all mappings .Mdl files separately (E.g : we have mapping names are abc and xyz… we need to mdl file abc.mdl and xyz.mdl).
If I export mappings in Design Center mapping wise it will take alot of to complete/get individual scripts (.mdl)
I heard for time consuming and security wise we should use OMB plus.
Any one helps me to export mappings individually through OMB.
Is there any way to pass mapping name should export the mapping with log file?
Thanks and Regards
VenkatOK, here is a script that you will be able to adapt get you to where you want to go. Bear in mind that it uses a config file to hold some variables, and library file which I shall also attach.
This script isn't exaclty what you are asking, but it's pretty close. The reason I made this script was to be able to create a clone of an existing project through OMB+ becuase in our corporate dev environment I couldn't lock down the repository in exclusive mode to do this in a simple copy/paste. The script uses a bit of a work-around because the MDL files include full path names, meaning if you export from project A it will want to import into project A. So if I want to import them into project B I take the existing project A, rename it to the desired new name (B), do the export (on a per-unit basis as you want), then rename the existing project back to what it was (A), create the new empty project (B) and import the objects now that the naming structures will match. (whew - did you catch all that?)
Anyway, here is the script. It uses standard TCL for a lot of the file stuff (glob etc), and for cycling through the modules and objects using the TCL foreach statement. Don't worry about the functions you don't recognize like exec_omb. They are in the library (coming up next), which just has to be colocated with the script for the script to reference at runtime:
# PVCS Version Information
#/* $Workfile: create_deployment_mdl.tcl $ $Revision: 2.1 $ */
#/* $Author: michael.broughton $
#/* $Date: 27 Nov 2008 10:00:04 $ */
# To run this script, start OMB Plus.
# Run this script providing the command (on Windows): source <path>/copy_owb_project.tcl
# e.g. source c:/owb/script/copy_owb_project.tcl
# Get Current Directory and time
set dtstmp [ clock format [clock seconds] -format {%Y%m%d_%H%M}]
set scrpt [ file split [file root [info script]]]
set scriptDir [ file dirname [info script]]
set scriptName [ lindex $scrpt [expr [llength $scrpt]-1]]
set cnfg_lib "$scriptDir/ombplus_config.tcl"
set owb_lib "$scriptDir/omb_library.tcl"
# Import Lbraries
# Assumes that owb_config and omb_library are in the same directory as this
# script.
#get config file
source $cnfg_lib
#get standard library
source $owb_lib
# Set Logfile
# This will overwrite anything set in the config file.
set SPOOLFILE ""
append SPOOLFILE $scriptDir "/log_" $scriptName "_" $dtstmp ".txt"
# PROCEDURES SECTION
proc owb_export_object {PROJECT_NAME MODULE_NAME MDL_PATH LOG_PATH TYPE TYPELIST} {
set print [OMBCC '$MODULE_NAME']
set objList [OMBLIST $TYPELIST]
foreach objName $objList {
set objExportStatus [OMBEXPORT MDL_FILE '$MDL_PATH/$objName.mdl' PROJECT '$PROJECT_NAME'\
COMPONENTS ($TYPE '$MODULE_NAME/$objName')\
OUTPUT LOG '$LOG_PATH/$objName.log']
puts "$objExportStatus"
set print [OMBCC '..']
puts "$print"
# MAIN SCRIPT SECTION
log_msg LOG "This script is used to copy a minor version project into a major version project and to create a full project mdl file suitable for deployment. "
log_msg LOG "WARNING: This will overwrite any existing metadata in the major version project. If you have metadata you wish to save, stop now and go take care of that first! "
puts -nonewline "Do you want to continue?(Y/N) "
set EXITEARLY [gets stdin]
if [string match N $EXITEARLY] {
log_msg LOG "Exiting...."
return 0
} elseif [string match n $EXITEARLY] {
log_msg LOG "Exiting...."
return 0
} else {
log_msg LOG "Continuing...."
puts -nonewline "Which project do you want to create a deployment file for? "
set CUR_PROJECT_NAME [gets stdin]
puts -nonewline "Under which final project name? "
set NEW_PROJECT_NAME [gets stdin]
puts -nonewline "Local temp directory to use for MDL generation: "
set MDL_PATH [gets stdin]
set LOG_PATH "$MDL_PATH/logs"
#set up the temp directory structure
if [catch { set retstr [file mkdir $MDL_PATH] } errmsg] {
puts "Cannot create directory $MDL_PATH. due to error: $errmsg"
puts "Exiting...."
exit
} else {
#make the subdirectories
file mkdir $LOG_PATH
file mkdir $MDL_PATH/mappings
file mkdir $MDL_PATH/transforms
file mkdir $MDL_PATH/tables
file mkdir $MDL_PATH/views
file mkdir $MDL_PATH/sequences
# Connect to repos
set print [exec_omb OMBCONNECT $OWB_DEG_USER/$OWB_DEG_PASS@$OWB_DEG_HOST:$OWB_DEG_PORT:$OWB_DEG_SRVC USE REPOSITORY '$OWB_DEG_REPOS']
if [omb_error $print] {
exit_failure "Unable to connect to repository."
} else {
log_msg LOG "Connected to Repository"
# Test given project names
set print [exec_omb OMBCC '$CUR_PROJECT_NAME']
if [omb_error $print] {
exit_failure "Project $CUR_PROJECT_NAME does not exist. Nothing to copy...."
exec_omb OMBCC '..'
set print [exec_omb OMBCC '$NEW_PROJECT_NAME']
if [omb_error $print] {
log_msg LOG "Confirmed project $NEW_PROJECT_NAME does not exist..."
} else {
log_msg LOG "Target project $NEW_PROJECT_NAME already exists. Dropping...."
exec_omb OMBCC '..'
set print [exec_omb OMBDROP PROJECT '$NEW_PROJECT_NAME']
if [omb_error $print] {
exit_failure "Unable to drop project $NEW_PROJECT_NAME. Exiting...."
OMBSAVE
# Begin export.
log_msg LOG "Temporarily renaming current project to new project name"
set print [exec_omb OMBALTER PROJECT '$CUR_PROJECT_NAME' RENAME TO '$NEW_PROJECT_NAME']
if [omb_error $print] {
exit_failure "This account does not have alter privileges on this project"
OMBSAVE
OMBCC '$NEW_PROJECT_NAME'
set moduleList [OMBLIST ORACLE_MODULES]
foreach moduleName $moduleList {
owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/mappings $LOG_PATH MAPPING MAPPINGS
owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/transforms $LOG_PATH PROCEDURE PROCEDURES
owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/transforms $LOG_PATH FUNCTION FUNCTIONS
owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/tables $LOG_PATH TABLE TABLES
owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/views $LOG_PATH VIEW VIEWS
owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/sequences $LOG_PATH SEQUENCE SEQUENCES
puts "BACKUP PROCESS has been Completed."
OMBCC '..'
log_msg LOG "Renaming back to original project name"
set print [exec_omb OMBALTER PROJECT '$NEW_PROJECT_NAME' RENAME TO '$CUR_PROJECT_NAME']
log_msg LOG "Creating new project..."
set print [exec_omb OMBCREATE PROJECT '$NEW_PROJECT_NAME']
if [omb_error $print] {
exit_failure "Unable to create project '$NEW_PROJECT_NAME'"
} else {
log_msg LOG "Created Project '$NEW_PROJECT_NAME'"
exec_omb OMBSAVE
exec_omb OMBCC '$NEW_PROJECT_NAME'
log_msg LOG "Creating modules..."
foreach moduleName $moduleList {
set print [exec_omb OMBCREATE ORACLE_MODULE '$moduleName']
OMBSAVE
log_msg LOG "Importing Tables..."
set mdl_maps [glob $MDL_PATH/tables/*mdl]
foreach mdl_map $mdl_maps {
puts "importing TABLE module $mdl_map from MDL file"
set print [OMBIMPORT MDL_FILE '$mdl_map' USE CREATE_MODE MATCH_BY NAMES]
puts "$print"
OMBSAVE
log_msg LOG "Importing Sequences..."
set mdl_maps [glob $MDL_PATH/sequences/*mdl]
foreach mdl_map $mdl_maps {
puts "importing SEQUENCE module $mdl_map from MDL file"
set print [OMBIMPORT MDL_FILE '$mdl_map' USE CREATE_MODE MATCH_BY NAMES]
puts "$print"
OMBSAVE
log_msg LOG "Importing Views..."
set mdl_maps [glob $MDL_PATH/views/*mdl]
foreach mdl_map $mdl_maps {
puts "importing VIEW module $mdl_map from MDL file"
set print [OMBIMPORT MDL_FILE '$mdl_map' USE CREATE_MODE MATCH_BY NAMES]
puts "$print"
OMBSAVE
log_msg LOG "Importing PlSql..."
set mdl_maps [glob $MDL_PATH/transforms/*mdl]
foreach mdl_map $mdl_maps {
puts "importing PLSql module $mdl_map from MDL file"
set print [OMBIMPORT MDL_FILE '$mdl_map' USE CREATE_MODE MATCH_BY NAMES]
puts "$print"
OMBSAVE
log_msg LOG "Importing Mappings..."
# import mappings from directory of MDL files
set mdl_maps [glob $MDL_PATH/mappings/*mdl]
foreach mdl_map $mdl_maps {
puts "importing MAPPING module $mdl_map from MDL file"
set print [OMBIMPORT MDL_FILE '$mdl_map' USE CREATE_MODE MATCH_BY NAMES]
puts "$print"
OMBSAVE
log_msg LOG "Completed Import..."
log_msg LOG "Exporting complete project file...."
set objExportStatus [OMBEXPORT MDL_FILE '$MDL_PATH/$NEW_PROJECT_NAME.mdl' PROJECT '$NEW_PROJECT_NAME' OUTPUT LOG '$LOG_PATH/$NEW_PROJECT_NAME.log']
puts "$objExportStatus"
log_msg LOG "Cleaning up temp directory..."
file delete -force $MDL_PATH/mappings
file delete -force $MDL_PATH/transforms
file delete -force $MDL_PATH/tables
file delete -force $MDL_PATH/views
file delete -force $MDL_PATH/sequences
file delete -force $LOG_PATH
OMBDISCONNECT And here is my standard helper library:
# PVCS Version Information
#/* $Workfile: omb_library.tcl $ $Revision: 2.9 $ */
#/* $Author: michael.broughton $
#/* $Date: 10 Mar 2009 11:04:50 $ */
# Default logging function.
# Accepts inputs: LOGMSG - a text string to output
proc log_msg {LOGTYPE LOGMSG} {
#logs to screen and file
global SPOOLFILE
if {![info exists SPOOLFILE]} {
puts "LOGFILE UNDEFINED! :-> $LOGTYPE:-> $LOGMSG"
} else {
set fout [open "$SPOOLFILE" a+]
puts $fout "$LOGTYPE:-> $LOGMSG"
puts "$LOGTYPE:-> $LOGMSG"
close $fout
proc log_msg_file_only {LOGTYPE LOGMSG} {
#logs to file only
global SPOOLFILE
if {![info exists SPOOLFILE]} {
puts "LOGFILE UNDEFINED! :-> $LOGTYPE:-> $LOGMSG"
} else {
set fout [open "$SPOOLFILE" a+]
puts $fout "$LOGTYPE:-> $LOGMSG"
close $fout
proc exit_failure { msg } {
log_msg ERROR "$msg"
log_msg ERROR "Rolling Back....."
exec_omb OMBROLLBACK
log_msg ERROR "Exiting....."
# return and also bail from calling function
return -code 2
proc exec_omb { args } {
log_msg_file_only OMBCMD "$args"
# the point of this is simply to return errorMsg or return string, whichever is applicable,
# to simplify error checking using omb_error{}
if [catch { set retstr [eval $args] } errmsg] {
log_msg OMB_ERROR "$errmsg"
log_msg "" ""
return $errmsg
} else {
log_msg OMB_SUCCESS "$retstr"
log_msg "" ""
return $retstr
proc omb_error { retstr } {
# OMB and Oracle errors may have caused a failure.
if [string match OMB0* $retstr] {
return 1
} elseif [string match ORA-* $retstr] {
return 1
} elseif [string match java.* $retstr] {
return 1
} elseif [string match Error* $retstr] {
return 1
} else {
return 0
proc ers_omb_connect { OWB_USER OWB_PASS OWB_HOST OWB_PORT OWB_SRVC OWB_REPOS } {
# Commit anything from previous work, otherwise OMBDISCONNECT will fail out.
catch { set retstr [ OMBSAVE ] } errmsg
log_msg LOG "Checking current connection status...."
#Ensure that we are not already connected.
if [catch { set discstr [ OMBDISCONNECT ] } errmsg ] {
set discstr $errmsg
# Test if message is "OMB01001: Not connected to repository." or "Disconnected."
# any other message is a showstopper!
if [string match Disconn* $discstr ] {
log_msg LOG "Success Disconnecting from previous repository...."
} else {
# We expect an OMB01001 error for trying to disconnect when not connected
if [string match OMB01001* $discstr ] {
log_msg LOG "Disconnect unneccessary. Not currently connected...."
} else {
log_msg ERROR "Error Disconnecting from previous repository....Exiting process."
exit_failure "$discstr"
set print [exec_omb OMBCONNECT $OWB_USER/$OWB_PASS@$OWB_HOST:$OWB_PORT:$OWB_SRVC USE REPOSITORY '$OWB_REPOS']
if [string match *Connected* $print] {
return $print
} else {
return "OMB0-Unknown Error connecting. Validate connection settings and try again"
proc ers_omb_drop_mapping { MAPNAME } {
set mplst [OMBLIST MAPPINGS]
if {[string match *$MAPNAME* $mplst]} {
log_msg LOG "Mapping $MAPNAME Exists."
log_msg LOG "Un-Deploying: $MAPNAME"
set print [ exec_omb OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('DROP') SET REFERENCE MAPPING '$MAPNAME' ]
if [omb_error $print] {
exit_failure "Unable to create Deployment plan for '$MAPNAME'"
set print [ exec_omb OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ]
if [omb_error $print] {
exit_failure "Error on execute of Deployment plan for '$MAPNAME'"
exec_omb OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
exec_omb OMBSAVE
set print [exec_omb OMBDROP MAPPING '$MAPNAME']
if [omb_error $print] {
exit_failure "Failed attempt to drop existing version of this mapping. Exiting."
proc ers_omb_refresh_object { OBJTYPE OBJNAME } {
# prompts for refresh of object if exists, except for sequence which do not structurally change.
# VALID FOR SEQUENCES, TABLES, AND VIEWS ONLY
global ORA_MODULE_NAME
set l_objtype [string tolower $OBJTYPE]
set OBJTYPES $OBJTYPE
append OBJTYPES "S"
set tblst [OMBLIST $OBJTYPES]
if {[string match *$OBJNAME* $tblst]} {
log_msg LOG "$l_objtype $OBJNAME already exists."
if [string match SEQUENCE $OBJTYPE] {
# Sequences don't need refreshing!
log_msg LOG "No need to refresh sequence..."
return
puts -nonewline "Do you want to re-import the $l_objtype?(Y/N) "
set EXITEARLY [gets stdin]
log_msg_file_only LOG "Do you want to re-import the $l_objtype?(Y/N) $EXITEARLY"
if {[string match Y $EXITEARLY] || [string match y $EXITEARLY]} {
log_msg LOG "Re-importing $OBJNAME...."
exec_omb OMBDROP $OBJTYPE '$OBJNAME'
exec_omb OMBSAVE
exec_omb OMBCC '..'
set print [exec_omb OMBCREATE TRANSIENT IMPORT_ACTION_PLAN 'IMPORT_PLAN' ADD ACTION 'IMPORT_ACTION' SET REF SOURCE $OBJTYPE '$OBJNAME' SET REF TARGET ORACLE_MODULE '$ORA_MODULE_NAME']
if [omb_error $print] {
exit_failure "Failed attempt to create import plan this $l_objtype. Exiting."
set print [exec_omb OMBIMPORT FROM METADATA_LOCATION FOR IMPORT_ACTION_PLAN 'IMPORT_PLAN']
exec_omb OMBDROP IMPORT_ACTION_PLAN 'IMPORT_PLAN'
if [omb_error $print] {
exit_failure "Failed attempt to import this $l_objtype. Exiting."
} elseif [string match *Failure* $print] {
#A failure to create second-class objects will not be caught with omb_error()
log_msg ERROR "An error prevented proper import. I recommend re-trying import through the GUI, and "
log_msg ERROR "then re-running this script but answering 'N' to re-import for this $l_objtype."
exit_failure "Failed attempt to import this $l_objtype. Exiting."
if [string match TABLE $OBJECTTYPE] {
if [string match I_APLCTN_DTL_DSB_ELGBL_CHLDRN $OBJNAME] {
set SHDWNAME I_APLCTN_DSB_ELGBL_CHLDRN
} elseif [string match F_RPTD_ENTLMNT_MNTHLY_SNPSHT $OBJNAME] {
set SHDWNAME F_RPTD_ENTLMNT_SNPSHT
} elseif [string match U_PROG_BNFT_PRVSN_ADMS_MAP $OBJNAME] {
set SHDWNAME U_PROG_BNFT_PRVSN_ADM_MAP
} elseif [string match U_PROG_BNFT_PRVSN_LGCY_MAP $OBJNAME] {
set SHDWNAME U_PROG_BNFT_PRVSN_LGC_MAP
} elseif [string match U_BNFCRY_CMBND_DBL_ENTLMNT $OBJNAME] {
set SHDWNAME U_BNFCRY_CMBND_DB_ENTLMNT
} else {
set SHDWNAME $OBJNAME
if [catch { set retstr [ OMBALTER TABLE '$OBJNAME' SET PROPERTIES (SHADOW_TABLE_NAME) VALUES ( 'ERR\$_$SHDWNAME')] } errmsg] {
log_msg ERROR "Unable to set shadow table name for table $OBJNAME"
log_msg ERROR "$errmsg"
exec_omb OMBCC '$ORA_MODULE_NAME'
} else {
log_msg LOG "Skipping $l_objtype re-import...."
} else {
log_msg LOG " $l_objtype $OBJNAME Does not exist."
log_msg LOG "Importing $OBJNAME...."
exec_omb OMBCC '..'
set print [exec_omb OMBCREATE TRANSIENT IMPORT_ACTION_PLAN 'IMPORT_PLAN' ADD ACTION 'IMPORT_ACTION' SET REF SOURCE $OBJTYPE '$OBJNAME' SET REF TARGET ORACLE_MODULE '$ORA_MODULE_NAME']
if [omb_error $print] {
exit_failure "Failed attempt to create import plan this $l_objtype. Exiting."
set print [exec_omb OMBIMPORT FROM METADATA_LOCATION FOR IMPORT_ACTION_PLAN 'IMPORT_PLAN']
exec_omb OMBDROP IMPORT_ACTION_PLAN 'IMPORT_PLAN'
if [omb_error $print] {
exit_failure "Failed attempt to import this $l_objtype. Exiting."
} elseif [string match *Failure* $print] {
#A failure to create second-class objects will not be caught with omb_error()
log_msg ERROR "An error prevented proper import. I recommend re-trying import through the GUI, and "
log_msg ERROR "then re-running this script but answering 'N' to re-import for this $l_objtype."
exit_failure "Failed attempt to import this $l_objtype. Exiting."
exec_omb OMBCC '$ORA_MODULE_NAME'
} And the config file:
# PVCS Version Information
#/* $Workfile: ombplus_config.tcl $ $Revision: 2.0 $ */
#/* $Author: gerry.hunt $
#/* $Date: 28 Nov 2008 08:37:12 $ */
# This version of the Config file differs from the standard owb_config.tcl
# used by the deployment script. It requires TWO repository configurations
# (Corporate Design Repository and Deployment location runtime repository)
# and does not require some of the logging / file location info used by the
# install script.
# GLOBAL VARIABLE DECLARATION SECTION
#CORPORATE DESIGN REPOSITORY CONNECTION INFORMATION
# Login info for the design repository owner
set OWB_DEG_USER michael_broughton
set OWB_DEG_PASS my_password
set OWB_DEG_HOST 123.4.5.6
set OWB_DEG_PORT 1628
set OWB_DEG_SRVC ORCL
set OWB_DEG_REPOS owb_mgr
# RUNTIME CONTROL CENTER AND LOCATION DECLARATION SECTION
set CONTROL_CENTER_NAME ERS_CTL_DEVR1000_1T
set CONTROL_CENTER_SCHEMA owb_mgr
set CONTROL_CENTER_PASS owb_mgr_PWD
#Connection info to ers_etl_app deployment schema
set DATA_LOCATION_NAME ERS_DEVR1000_1T
set DATA_LOCATION_VERS 10.2
set DATA_LOCATION_USER ERS_ETL_APP1T
set DATA_LOCATION_PASS ERS_ETL_APP1T
set DATA_LOCATION_HOST host001
set DATA_LOCATION_PORT 1554
set DATA_LOCATION_SRVC orcl
# PROJECT,MUDULE AND DIRECTORY DECLARATION SECTION
set PROJECT_NAME ERS_DM_R7_0C6_02
set ORA_MODULE_NAME ERS_ETL_APPDang... that's a lot of stuff. But it should get you well on your way to what you need.
Cheers,
Mike -
Exporting DivX through Quicktime
Hi,
I am trying to export a DivX video through Quicktime pro Version 7.6.2, It gave me the option to export movie files into DivX, and it would show in the export window that the file is exporting but the converted divx file doesn't exist anywhere in my computer (i did a search and came out nothing) even though Quicktime has spent more than 1 hour exporting the file.
What really strange is, I tried this a number of times and found out that the divX export only works one time for 1 file and only after I restart my computer, so If I have 10 files i want to convert, I have to restart my computer 10 times for each file, which I find is very ridiculous.
Can someone explain what is wrong here? is there a way for me to fix this problem?
I had DivX7 for mac and Perian installed and a Quicktime pro Version 7.6.2I think you'll be more likely to get help with this if you ask in the DivX forums. If QuickTime can successfully export the video to one of the formats that QuickTime natively supports - if you haven't tried that (H.264, for instance), give that a try - then it's probably not a problem with QuickTime itself.
Good luck. -
IBook G3 Dual USB exporting video through firewire & playing video DVD's
Is it possible to export video from Powerpoint, Final Cut Pro or Quicktime Pro through the firewire port to an external device on this machine?
I am running OSX Panther. I have tried several times to go to several external devices and have had no luck.
Also, is there a way to load the Apple DVD player and play video DVD's on this iBook? I have installed an internal CD-RW/DVD drive, which works fine for burning CD's or reading data DVD's, but I can not get movies to play.
Thanks,
MPHIt's very important to determine which iBook you have, since different models use different adapters.
Check out this Apple Knowledge Base article to determine which model iBook it is:
http://docs.info.apple.com/article.html?artnum=88039
Also, you can click on the blue Apple logo in the upper left of the display, and choose "About This Mac" from the drop-down menu. It will tell you the MHz rating of the Mac. Clicking on "More Info…" will open the System Profiler which will give you even more information about your computer, including which type of optical drive it has (which, assuming it still has the original optical drive, can be a clue as to which model it is).
Maybe you are looking for
-
Button in ALV toolbar with REUSE_ALV_GRID_DISPLAY
Hello friends, I am Displaying ALV using REUSE_ALV_GRID_IDSPLAY. i need to add a button in grid toolbar. i am doing it by adding a new ZSTATUS in SET PF_STATUS. but the problem is that it is removing the standard buttons. i want to add button withou
-
CR2 files open in CS4 but not in Bridge
I'm running Windows XP, CS4 11.02. Bridge 3.0.0.464, ACR 5.7, which I installed using the Updater. I purged my Bridge cache. Still get the "No Items to display" when I try to access my CR2 files. I can open the files (although I can't see thumbnails)
-
Suppose there are 50 dedicated packages for top 50 table and 25 SAPXXXX package in total. I want to: Load them order by size (seems this is the default setting in migtion monitor) For those 50 tables, I need specify both DDL file and loadArgs 8 paral
-
Hi I am getting an update failed message (49) when trying to update photoshop after installing and whenever I start photoshop and try to access the file menu it crashes
-
How do you resend a certain email?
I can't figure out How you resend your confirmation code to my email address so I can check my mailing status on my new phone I order online...