WiseImage Open Architecture Lessons Mission Impossible.

Презентация:



Advertisements
Похожие презентации
WiseImage Open Architecture. Why to open? Modern technology demands A growing amount of customers demands for custom commands The limited development.
Advertisements

WiseImage 6.0 for AutoCAD 2000/2000i/2002/2004 and AutoCAD LT 2000/2000i/2002/2004 On the leading edge of new technology.
DRAFTING TECHNIQUES I 136. Here is a basic shape. From here, we will do some advanced drafting once we put this shape on a sheet as a drawing. Select.
Any film needs a script. The script can be written by yourself or you can buy it. The second is preferable. All good writers are always listed in any.
Introducing Cisco Network Service Architectures © 2004 Cisco Systems, Inc. All rights reserved. Introducing the Network Design Methodology ARCH v
11 BASIC DRESS-UP FEATURES. LESSON II : DRESS UP FEATURES 12.
S15-1 PAT318, Section 15, March 2005 SECTION 15 MSC.PATRAN FILES.
Linux Daemons. Agenda What is a daemon What is a daemon What Is It Going To Do? What Is It Going To Do? How much interaction How much interaction Basic.
Using Dreamweaver MX Slide 1 Window menu Manage Sites… Window menu Manage Sites… 2 2 Open Dreamweaver 1 1 Set up a website folder (1). Click New…
Ecology and fashion. Project was done by Borodina Ludmila from 10 B.
DRAFTING and DIMENSIONING 98. A properly dimensioned drawing of a part is very important to the manufacturing outcome. With CATIA, it can be a very simple.
The Web The Internet. Level A2 Waystage Level A2 Waystage Listening (p.17) I can understand simple messages delivered at a relatively high speed (on every.
Copyright DASSAULT SYSTEMES D Functional Tolerancing & Annotation CATIA Training Exercises Version 5 Release 8 February 2002 EDU-CAT-E-FTD-FX-V5R8.
Wedge Inclined Plane Screw Wheel and Axle Lever Pulley.
ADVANCED DRESS-UP FEATURES 39. Once OK has been selected, your part will appear with the filleted area highlighted by orange lines at the boundaries.
What is truth? The life and the eternity… But people often mix it up with prosperity and the desire to gain material well-being…
1. Do you like your school? I should say that I love my school a lot. For me its not only a building where I get knowledge, but also the second home of.
Sequences Sequences are patterns. Each pattern or number in a sequence is called a term. The number at the start is called the first term. The term-to-term.
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Managing Your Network Environment Managing Cisco Devices.
Debates Is Halloween necessary for Russia?. Film about Halloween The main characters – the students of school 49.
Транксрипт:

WiseImage Open Architecture Lessons Mission Impossible

Objectives Learn how to use Active Script studio Create a new command that scales your image –Measure the distance –Convert it to paper units –Get prompted for a desired distance –Scale the image

Preparation Open Active Script Studio Observe the tools –F–File operations –E–Edit, Search and Undo –R–Run, FormWizard and Reference Lets start

Step 1:Measure Distance

Step 1: Discussion Root objects like Document, Command Interaction with user – messages, prompts, forms Choosers – important interactive objects

Step 1: Execution Save your script Create a toolbar for your brilliant commands Assign a new button to your command Run it!

Step 2: Paper Units Coordinate systems: WCS, UCS, units What are paper units? How to convert data to paper units and back to world units? Useful transformation object - Transformer

Step 2: Code changes Add transformation function function ToPaperUnits(val) { with (Document.CoordinateSystem.PaperUnit) { val = W2U.Direct(val); return D2S(val); } Command.Alert("Distance is " + org_dist); Modify your previous code by replacing with Command.Alert("Distance is " + ToPaperUnits(org_dist));

Step 2: Execution Change units to inches Run the command again Run your command What is the difference?

Step 3: Be Interactive! Script commands can be interactive How to get response from user? –Alert – a simple reply yes or no –Prompt – get some literate response –Forms – the most sophisticated and flexible way

Step 3: Code changes Modify your previous code by replacing var res = Command.Prompt( "You have measured the distance " + ToPaperUnits(org_dist) + "\r\nEnter the required distance", "Scale Image"); try { var new_dist = ToWorldUnits(res); if (new_dist == 0.0) Command.Quit(); Command.Alert(new_dist); } catch (e) { Command.Alert(e); } // TODO: Add ToWorldUnits() code Command.Alert("Distance is " + org_dist); with

Step 3: Execution Run your code

Final point How to process images: –Tools collection –Batch commands

Final point: Code changes Modify your previous code by replacing with (Tools("Resample")) { ToolParam("ResampleType") = 1; ToolParam("Scale") = * new_dist / org_dist; ToolParam("ResampleFlag") = true; WiseRun(); Document.View.Invalidate(); } with Command.Alert("Distance is " + org_dist);

Final point: Fulfillment Load the sample image Run your command Enjoy Do you know any other way how to do the same?

Be Interactive – part 2 HTML forms Form Designer is part of Active Script Studio Form Wizard will help you to create good looking forms.

Form creation Create a new form Add your controls Save the form

FormWizard Create a new simple script function Main() { } Save it Run FormWizard Just follow instructions Run your script

The magic of forms Open the sample script Bonus\RasterResize.js Run it

Gifts Interactive Image scaling – wrap.js Back to the Future – text_rotate.js GIS sample