Home
Manifold Script / .NET / XML Examples
Contents
1. Report AddText purpose ToDo purpose amp vbCrLf Report AddText descript amp vbCrLf Report AddText timeperd amp vbCrLf Report AddText timeinfo amp vbCrLf Report AddText sngdate amp vbCrLf Report AddText caldate amp YYYYMMDD Date Now amp caldate amp vbCrLf Report AddText time amp HHMM Time Now amp time amp vbCrLf Report AddText sngdate amp vbCrLf Report AddText timeinfo amp vbCrLf Report AddText lt current gt ToDo ground condition publication date free text current amp vbCrLf Report AddText timeperd amp vbCrLf Report AddText status amp vbCrLf pick one Report AddText progress ToDo Complete In work Planned progress amp vbCrLf Report AddText progress In work lt progress gt amp vbCrLf Report AddText update ToDo Continually Daily Weekly Monthly Annually Unknown As needed Irregular None planned free text lt update gt amp vbCrLf Report AddText status amp vbCrLf Report AddText spdom amp vbCrLf Report AddText bounding amp vbCrLf Application StatusText Application StatusText amp append drawing to report If manComp TypeName Drawing Then set params manComp CoordinateSystem Parameters Set rect Nothing Select Case manComp TypeName Case Drawing set manObjSet manComp Obj
2. Comp is a Drawing Component We want to find the coordinate in the Drawings Object set that contains the largest number of characters and return the string length of that coordinate 297 Dim Dim Dim Set Str Lengths 0 Str Lengths 1 Str Lengths 2 Str Lengths 3 Rect Str_Lengths 3 Index wre we wH If Str Lengths 0 MaxX WholeNumber Else MaxX WholeNumber End If If Str Lengths 2 MaxY WholeNumber Else MaxY WholeNumber End If End Function This would include any leading minus sign and a decimal point Rect Drwg ObjectSet GeomSet Box Len Len Len Len cs cs GSE cs Rect XMax Rect XMin Int Rect YMax Rect YMin gt Str Lengths 1 Then Str L Str Str Lengths 0 Lengths 1 engths 3 Then Str Lengths 2 Str Lengths 3 Ck CK Ck ck Ck Ck KC Ck Ck Ck Ck Ck Ck Ck Ck ck Ck Kk Ck ck Ck Ck Ck Ck ck Sk Ck kk Ck ck kk Ck kk Ck ck kk kk Sk Sk Sk Sk Sk kx Mk kv ko ko ko ko ko ko 298 Tables Add Columns to a Table http 69 17 46 171 Site Thread aspx id 17410 amp ti 632713376167300000 Rodrigo at 12 28 2005 12 15 AM 17411 I m programming a script in Manifold 6 an I ve achieved to create a NewDrawing by code selecting records from another drawing But this new drawing has only its own field ID I want to generate this drawing with more columns This
3. batch updates for performance Document BatchUpdates True traverse image pixels modifying selection state as necessary For Index 0 To Pixels Count 1 If Index Mod 100 0 Then Application StatusText CStr Index of CStr Pixels Count pixels End If Set Pixel Pixels Index deselect pixel Pixel Mask Pixel Mask And Not 1 send pixel coordinates to geometric entity taking care of inverse Y direction Point X Pixel X Point Y Image Height Pixel Y 1 Set PointGeom Application NewGeom GeomPoint Point convert pixel coordinates to drawing Converter Convert PointGeom 55 loop through selected objects within drawing to check if there s one that contains pixel For IndexObj 0 To SelectedObjects Count 1 Set Object SelectedObjects Item IndexObj If Object Geom CheckContains PointGeom Then Pixel Mask Pixel Mask Or 1 Exit For End If Nex Next process batched updates Document BatchUpdates False Application StatusText End Sub Select Pixels with 50 Meters of Selected Objects Modifies selection within Vatican Image image so that each pixel within 50 meters of any of selected objects in Vatican drawing is also selected and all other pixels are unselected Sub Main Set Components Document ComponentSet Se Se btain image and drawing Drawing Components Components ItemByName Vatican Image Components Compone
4. eese nennen 56 CAPTURING SREENSHOTS OF THE ACTIVE COMPONENT csessssssececsessssecececccsesesssseceeecsesesssaeceeececcesaseaeeeesesenenseaeees 57 ACTIVE COLUMNNS 5 se ee eee eroe een uae ve ERBEN EE TVE eR NUT ONUS ERAS REE ae Te EAEn SERERE ERE REN RN ae NEUE OENE SEO eE RUN PENES e eu T EEEa aiSia 63 ACTIVE COLUMNS CANNOT BE ADDED PROGRAMMATICALLY WORK AROUND ccceceesssceeececeesenssceceesesensnnsaeees 63 CREATE ACTIVE COLUMN SCRIPT COMPONENT MUST BE PREVIOUSLY ATTACHED TO THE TABLE ee 63 CALCULATING SPHERICAL DISTANCES AND AREAS cesses eene th nnn eset enne tete nn nasse sente than ns ness eee te anna 64 TWO OR MORE ACTIVE COLUMNS IN ONE TABLE cesses emen ee enhn ense en entere annes esee tete nn sese s ente tea nn nes 68 CREATE A COLUMN COUNTER SEQUENCED NUMBER USING AN ACTIVE COLUMN eere 68 CALCULATE THE DISTANCE IN MILES FROM GIVEN POINT TO ALL GEOMG csccscsccececeesssseceeececsesesseceeececsenenseaeees 71 ACTIVE COLUMN TO REFERENCE THE PREVIOUS RECORD IN A TABLE csessessscecececeessnsecaeccecsensnssseeeeseseneneaeees 72 ANALYZER OBJECT eeseeiceee cesesveaeete tuo eoo ee Sao ee Ree n snae nee ro ees ua se eese so eve ca dee rev oe ou Dose vere aae eu rece edes e Vae in nose iun 73 SELECT TOUCH ALL OBJECTS IN ALL MAP LAYERS THAT TOUCH A BOUNDING OBJECT eee 73 EXPLODE POLY LINE 53 RE fates cadets reet ds soe E EAE oe eo dee
5. enn 283 ACCESSING THE RECORDS LASTADDED OBJECT cccsesssccsccecsessaeceeececeessaececececseseseeececccsenenseseeeeeceenenssaeeeeeeeeeeneea 284 DUMPING V7X FORMATTING OPTIONS STYLE LISTS cccccsscccccecsesssececceeceesssaececececseseaeceecceeceseaeseeeesesenenssaeees 285 0 3 Odor C 286 IDs ASSIGNED TO NEW DRAWING OBJECTS ARE NOT GUARANTEED TO BE SEQUENTIAL cce 286 ADDING EDITING OBJECTS IN A DRAWING LAYER eceeeeetetenne eee I enne enn en eres e enn sett nee n terne enean eene nnne enn 286 How TO ADD OBJECTS POINTS TO A DRAWING ieeseeeeeeeeeeeenenere enne ener entren erret rennen rene rn enne 287 CREATING A NEW GEOM AND ADDING IT TO A DRAWING OBJECTSET cccceessssscecececeesssnsseeececeessseceeeeeesenenseaeeas 287 EXTRACT OBJECT COORDINATES VIA SCRIPT DRIVEN SQL ccccccesssscecssseececsseccesessececsesaececseeeecessaeeescssaeeeeneeeenses 289 EXTRACT OBJECT COORDINATES VIA OBJECT MODEL ccsessssccececsesssececceeceenssaeceecceceeseaeceecceeceseasaeeeeseseneneaeees 292 TABLES E P 299 ADD COLUMNS TOA PABER coc ierit rct ree rette tee eie epe Tre tatg cree t a te eem vei ue 299 ADDING COLUMNS TO A TABLE VIA SCRIPT MANIFOLD COLUMN ENUMERATIONS e 300 SCRIPTING TABLE RELATIONSHIPS cccccecessessscecececeesseececececseneecesececseneseeaeceeceeneuaseeeeecsesesaeeeeeeeesesa
6. vbQuestion Slope vbYes Then cs true Else cs false End If calculate orientation If Application Messagebox Do you want to calculate the orientation vbYesNo vbQuestion Orientation vbYes Then co true Else co false End If calculate vertical curvature 136 If Application Messagebox Do you want to calculate the vertical curvature vbYesNo vbQuestion Vertical Curvature vbYes Then cvc true Else cvc false End If calculate horizontal curvature If Application Messagebox Do you want to calculate the horizontal curvature vbYesNo vbQuestion Horizontal Curvature vbYes Then chc true Else chc false End If END OF USER DEFINED PARAMETERS check parameters If Not CBool windowsize Mod 2 Then Application Messagebox Window size has to be set using odd numbers Exit Sub End If retrieve dem component amp internal parameters Set window Application WindowSet ActiveWindow Set component window Component If window Component Type ComponentSurface Then Application Messagebox No active surface Exit Sub End If Set surface window Component tot cols surface Width tot rows surface Height surface name surface Name set surface coordsyst surface CoordinateSystem set coordparameters surface coordsyst Parameters set resolution param surface CoordinateSystem Para
7. Set Rect Application NewRect Set Records Table RecordSet cnt Comps Count 1 For nn 0 To Records Count 1 Set Rec Records nn dims 1570 Xx Rec Data X I Yy Rec Data Y I Xcentre Xx dims 2 Ycentre Yy dims 2 Set Centre Application NewPoint Centre X Xcentr Centre Y Ycentr Rect Center Centr Rect Xmin Xx Rect Ymin Yy Rect Xmax Xx dims 169 Rect Ymax Yy dims I use the name attribute from the table Map RenderAreaTo Rec Data name dims dims Rect True cnt cnt 1 Set Image Comps cnt Image Folder Folder Next Set expt Application NewExport JPEG For each comp in Folder Children expt Export comp C temp img amp comp name amp jpg PromptNone Next Comps Remove Comps ItemByName Layout Doc BatchUpdates False End Sub Export Table to MS EXCEL http 69 17 46 171 Site Thread aspx id 25853 amp ti 6329 1 1653850930000 If someone can point me in the right direction to using SQL or script to do the following which I currently do with a lot of selecting copy pasting and exporting I have a table in Manifold that has two columns headed CODE and DIST CODE contains about 30 different text codes and DIST contains floating point numbers There are from 3 23000 DIST entries per code I need to export to xls ending up with columns headed with each code name with the DIST values under that heading
8. If che true then Set HC5 horcurv pxset item horcurv pxset ItemByXY colcount rowcount End If calculate base values If cvc true or chc true then D 24 Value Z6 Value 2 25 Value R R E Z2 Valuet Z8 Value 2 Z25 Value R R F Z1 Valuet Z3 Valuet Z7 Value Z9 Value 4 R R End If G Z4 Valuet Z6 Value 2 R H Z2 Value Z8 Value 2 R If cs true then Slope calculation Set S5 slope pxset item slope pxset ItemByXY colcount rowcount Slope value atn sqr G GtH H 180 3 14159265359 S5 Value Slope valu End If If co true then Orientation calculation If G 0 then If H gt 0 then Orientation value 180 ElseIf H lt 0 then Orientation value 0 Else Orientation value 1 End If Else Orientation value Abs Atn H G 180 3 14159265359 If G lt 0 and H lt 0 then Orientation value Orientation value End If If G lt 0 and H gt 0 then Orientation value Orientation value 90 End If 139 Set If G gt 0 and H lt 0 then Orientation value Orientation value 270 End If If G gt 0 and H gt 0 then Orientation value Orientation value 180 End If End If 05 orientation pxset item orientation pxset ItemByXY colcount rowcount Next Next End If End Sub 05 End If If cvc If Els End If End
9. SAVE the offset and scale from the imported projection ORIGINAL VERSION BELOW d localScaleX params 6 Value localScaleY params 8 Value localOffse params 10 Value localOffse params 12 Value CX CY NEW CODE BASED UPON V7 CHANGES SEE NOTE AT BEGINNING OF THIS SECTION FROM KlausDE YOU CAN ALSO EXPLICITLY CHANGE THE PARAMETRES localScaleX params params ItemByName localScaleX localScaleX params 9 i localScaleY params 11 localOffsetX params 13 localOffsetY params 15 BEST APPRAOCH SUGGESTED BY KlausDE and Adam localScaleX params params ItemByName localScaleX OR the shorter variation provided by Adam localScaleX params localScaleX localScaleY params localScaleY localOffsetX params localOffsetX localOffsetY params localOffsetY change the current projection of the surface to th and respecify the scale and offset from the import loader Load GridToLoad loader Datum Load DatumToLoad Pre V7 settings params 6 Value localScaleX 1 params 8 Value localScaleY params 10 Value localOffsetX params 12 Value localOffsetY V7 params 9 Value localScaleX params 11 Value localScaleY params 13 Value localOffsetX params 15 Value localOffsetY params localScaleX l
10. amp amp CStr record Data Latitude I amp coordinates amp vbCrLf KMLText AddText vbtab amp Point amp vbCrLf KMLText AddText Placemark amp vbCrLf next KMLText AddText Folder amp vbCrLf KMLText AddText kml End Sub 172 IMS IMS Selections from Queries not being Updated Refreshed http 69 17 46 171 Site Thread aspx id 17271 amp ti 632708588838600000 Also see http www georeference org Forums tabid 71 view topic forumid 5 postid 8314 Default aspx bnhilton at 12 22 2005 12 10 AM 17328 Hi Adam Maybe I wasn t clear Let me explain again The query works correctly user draws an area of a specified size on the screen and then clicks a query button to select all the objects contained within that area This works fine all the information is returned in the table As defined by the query SELECT FROM My Table TrackArea Table WHERE Contains TrackArea Table ID My Table ID I understand this is not a parameter query I do need it to be just want to return all the information regarding the objects contained within the user defined area Yes if they pan or zoom the results of the query go away this is not the problem The problem occurs when the user draws a new area on the screen and then clicks the query button to select all the objects contained within that area The results of the previous query are returned and yes I h
11. http 69 17 46 171 Site Thread aspx id 27234 amp ti 632932921090100000 The code below is a modified version of Michael Sumner s original It has been reworked as a subroutine L Ketch Sep 2006 1 Ckokckck ck kk Ck Ck kk Ck Ck Ck Ck Ck Kk Ck ck kk Ck Sk Ck Ck Sk Ck kk ck ck kk Ck KKK ck kk Ck kk ck ck kk kk ko Sk ko Kk Sk ko kx kv ko ko ko ko ko Option Explicit Sub Main Assign CoordSys Universal Transverse Mercator Zone 17 N _ North American 1983 Canada _ ComponentDrawing End Sub 1 ck ck ck ck ck ck Ck ck Sk Ck Ck Ck Ck Ck Ck ck Ck ck Ck ck ck ck kk ck Ck ck ck kk ck kk kk ck kk ck ck ck kk ck ko Sk ck Sk Sk Mk Mk k ko ko ko ko kock ko Private Sub Assign CoordSys _ ByRef NewProjection ByRef NewDatum _ ByRef Comp Type NewProjection Projection String Ex Universal Transverse Mercator Zone 17 N New Datum Datum String Ex North American 1983 Canada Comp Type One of the standard enumerations H Ex ComponentDrawing ComponentDrawing ComponentSurface Use to reassign the Coordinate System and Datum of a Component when 1 The imported component was not assigned the correct Coordinate System and Datum But 2 The imported component Coordinate System parametres i are OK X and Y scales and Offsets Dim Comp Comps Dim Comp CoodSys Comp CoodSys Params Dim LocalScaleX LocalScaleY LocalOffsetX LocalOffsetY Iterate over all components sett
12. Debug Print Scale X Y Ix Print Tug Parameters Print Debug ItemByN False Easting N Parameters ItemByN Debug h direct calls latter r params amp amp vbTab amp Value amp vbCrLf eters Y amp vbTab amp vbTab amp ame localOffsetX Value amp vbcrlf ame localOffsetY Value amp vbCrLf amp vbTab amp vbTab amp vbTab amp ame localScaleX Value amp vbcrlf ame localScaleY Value amp vbCrLf amp vbTab amp vbTab amp vbTab amp ame scaleX Value amp vbcrlf ame scaleY Value amp vbCrLf orthing amp vbTab amp ame falseEasting Value amp vbcrlf 107 Debug Print amp comp CoordinateSystem Parameters ItemByName falseNorthing Value amp vbCrLf Debug Print Lat Lon I amp system Unit LatLon amp vbCrLf Debug Print Units amp system Unit Name amp amp system Unit NickName amp amp System Unit NickNameArea amp vbCrLf If system Unit LatLon False Then Debug Print Scale to meters amp system Unit Scale amp vbCrLf End If End With If comp TypeName Drawing Then End If Select Case comp TypeName Case Map Case Image Surface Set box comp Pixelset box printBox True Case Drawing Set objects comp ObjectSet Debug Print Number of objects amp CStr objects Count amp vbCrLf If object
13. If End End If Value Orientation value true or chc true then Vertical and horizontal curvature calculation G 0 and H 0 then Vertcurv value 0 Horcurv value 0 e Vertcurv value 2 D G G E H H F G H G G H H Horcurv value 2 D H H E G G F G H G G H H If cvc true then VC5 Value Vertcurv value LE chc true then HC5 Value Horcurv value If Extracting a Surface Height at a given Latitude Longitude AdamW 08 17 2004 9 06 AM http www georeference org Forums tabid 7 1 forumid 5 tpage 1 view topic postid 3 194 Default aspx 3710 Here is the script which obtains the height of the surface at the hard coded lat lon location VBScript Option Explicit Sub Main Dim Cmps Srf Conv Cssrc Cstgt 140 Dim Pt Pixs Pind Dim xco yco Dim X Y Z Dim MinX MaxX MinY MaxY Set Cmps Application ActiveDocument ComponentSet Set Srf Cmps Halifax CentralNS Surface create coordinate converter Set Conv Application NewCoordinateConverter Set Cssrc Application DefaultCoordinateSystemLatLon lat lon Set Cstgt srf CoordinateSystem Conv Prepare Cssrc Cstgt lat lon to surface get cursor coordinates near the point in the TargetPoint drawing xco 64 2 yco 44 8 Set Pt Application NewPoint xco yco Conv Convert Pt obtain Z Set Pixs Srf PixelSet Code between dashes has been added to Adam s original to p
14. Set Components Application ActiveDocument ComponentSet Set TargetTable Components Components ItemByName Products Set TargetRecords TargetTable RecordSet EqualTo Category ID Rec Data Category ID t fill product list Products Clear For Target 0 To TargetRecords Count 1 Products AddItem CStr TargetRecords Target Data Product Name Next End Sub VK KKK KKKKKKKKKKKKKKKKKKKKKKKKKKK KKK KKK KKK KKK KKK KKK KKKKKKKKKKKKKKKKKKKKKKKKEK Employee Viewer J Employee Viewer Employee Nancy Davi H SS Title SalesRepresentative Bith Date 127084948 Hire Date ozz Country USA Region wa City Seattle Postal Code a81 22 Address 507 20th Ave E Apt 24 Education includes a BA in Psychology from Colorado State University in 1970 She also completed The Art of the Cold Call Nancy is a member of Toastmasters International First Previous Next Last Close VK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK launch form on startup Sub Main Form Visible True End Sub Dim Employees EmployeeIndex 1 EmployeeCount 10 46 DKK ck ck ck KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KK KKK KKK KKK KK KKK KKK KKK ko A ko ko ko jump to first employee on load Sub Form OnLoad set up global variables Set Components Application ActiveDocument ComponentSet EmpPos Components It
15. Thanks How about VBScript Sub Main Set xlApp CreateObject Excel Application xlApp Workbooks Add Set xl xlApp Sheets 1 obtain records Set q Document NewQuery Temp q Text SELECT Code Dist FROM T ORDER BY Code q Run pass data to Excel 170 code column 1 row 1 For Each r in q Table RecordSet If r DataText Code code Then row row 1 Else code r DataText Code column column 1 row 2 xl Cells 1 column Value code xl Cells 1 column Font Bold true End If xl Cells row column Value r DataText Dist Next cleanup Document ComponentSet Remove q xlApp Visible True End Sub Export to KML http 69 17 46 171 Site Thread aspx id 27706 amp ti 6329479 12085830000 Sub Main Dim drawing Dim KMLText Set components document ComponentSet Set drawing components components ItemByName Drawing Set records drawing OwnedTable RecordSet Set KMLText document newcomments RSS KML KMLText AddText lt xml version amp CHR 34 amp 1 0 amp CHR 34 amp encoding amp CHR 34 amp UTF 8 amp CHR 34 amp amp vbCrLf KMLText AddText kml xmlns amp CHR 34 amp http earth google com km1 2 1 amp CHR 34 amp amp vbCrLf KMLText AddText Folder amp vbCrLf KMLText AddText lt name gt Your Drawingc name amp vbCrLf
16. 0 125 0 nDwg LineForeground DefaultValue Formatting application NewColor DarkGreen 0 125 0 SET nLayer Application ActiveDocument NewLayer nDwg map LayerSet Add nLayer map open END SUB VK KKK ck ck Ck Ck Ck Ck Ck Ck Ck Ck Ck CK Ck Ck Ck Ck KKK Ck Sk Ck kk Ck Ck kk Ck kk Ck ck kk Ck Sk Sk ko kx Sk Sk kx Mk kv k ko ko ko ko SUB TaggingOp get the coordinates of the first point in the line SET doc Application ActiveDocument 205 nnn E pl Di H H nn ti m H S S poin P P S unD HnNNHYN comps doc ComponentSet comp comps Bomber PTT 52526 objSet comp ObjectSet obj objSet 0 obj Type ObjectLine THEN branch obj Geom BranchSet Item 0 pts branch PointSet IF Set up a coordinate system and create a new drawing CS Application NewCoordinateSystem Latitude Longitude nDwg Application ActiveDocument NewDrawing Start Bomber CS AH AA tj Ed za OH pointset Application NewPointSet point Application NewPoint Ej Bj X CDbl pts 0 x Y CDbl pts 0 y set Add point oin Edit use pts Count method to set the x amp y coords for first point on line oint Create a new geometric entity ET geom Application NewGeom GeomPoint PointSet Create new point object Dwg ObjectSet Add geom T map Application ActiveDocument ComponentSet Map T nLayer App
17. An encode layerList layerItem n if layerList layerItem Ruas layersC layersC lt input id layer layerSqno name layer layerSqno layerChck type checkbox onclick invokePane layers gt An An encode layerList layerItem n layerSqnott 183 if layersC layersC n n layersC lt input type hidden id count name count value layerSqno gt n An code temp tag to be replaced Instead of the default code temp tag to be replaced if layerChck layerChck checked code temp tag to be replaced You could check to see if the IMS is actually displaying the layer and apply the check to the box appropriately code temp tag to be replaced if mapserver LayerShown layerItem true layerChck checked code temp tag to be replaced This may require you to also modify the code where you have released the mapserver object Hi Will It s working fine With the code that Adam posted and your code i solved not only this problem but also another problem that i had Thank you both 184 Labels Adding Labels via Code http 69 17 46 171 Site Thread aspx id 18202 amp ti 632737768954800000 I am trying to add labels programmatically VB NET XP Pro Sp2 Manifold 6 5 to a newly created drawing This is my code Dim mLabel As Manifold Labels mLabel
18. Hope it s useful cheers Mike ImportSelectedTile Author Michael D Sumner Date March 24 2004 Language VBScript Version 1 0 1 Platform Manifold 5 5 SP2 Not tested in any other Permission to use modify and distribute this code is hereby granted providing this ntire comment section is included No warranty is expressed or implied Usage Assumes th xistence of an external set of images as specified in Tiles Table FileName export images in Image Folder to file names in table Open drawing Tiles or Map with Tiles as active window Select one of the tiles run script The image should be imported and properly georeferenced Notes This should work for any image format and any projection but I ve not tested it I ve successfully used a similar process for images in UTM but that had a lot of other stuff implemented on top for a separate image serving application The setting of projection stuff is redundant if you have reliably georeferenced images in a good format that retains projection metadata VC Ck Ck C Sk Ck Ck Ck C Ck Ck Ck Ck Ck Ck kk Ck Ck Ck Ck kk kk Ck Ck Ck Ck ck kk Sk Ck Ck Ck Ck kk kk Sk Ck Ck kk kk kk Sk Sk ke KKK kx ko ko ok ok 153 Sub Main get the active window drawing or drawing in map Set Window Application WindowSet ActiveWindow Set Component Window ActiveComponent If Component Type lt gt ComponentDrawing Then Application Messagebox
19. Set Comps Document ComponentSet NumberOfSurfaces uBound Surfaces 1 For Counter 0 to NumberOfSurfaces 1 Set Comp Set CoordSys Set CoordSys Parametres Application StatusText Setting Current Projection Comps Surfaces Counter Comp CoordinateSystem CoordSys Parameters NumberOfSurfaces CoordSys _ loca loca loca local OffsetY amp The NTDB tiles import fine except for the DATUM and y offset Save the original values for offset and scale so they can be reset further down Thes parameters below may also be referenced by name using Parametres CoordSys Parametres ItemByName localScaleX localScaleX Value localScaleY Value localOffsetX Value l ScaleX CoordSys Parametres Item l ScaleY CoordSys Parametres Item l OffsetX CoordSys Parametres Item local OffsetY CoordSys Parametres Item CoordSys Load CorrectProjection CoordSys Datum Load CorrectDatum CoordSys Parametres Item localScaleX Value CoordSys Parametres Item localScaleY Value CoordSys Parametres Item localOffsetX Value CoordSys Parametres Item localOffsetY Value GI mVerified TRU Comp CoordinateSyst Next End S ub localOffsetY Value local ScaleX local ScaleY local OffsetX local OffsetY 0 75 Counter 1 amp 255 of amp VK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KK ko ko
20. parameters majorAxis size of the major axis in meters eccentricity square root from 1 minor minor major major centerX centerY and centerZ offsets to the center of the ellipsoid relative to WGS 84 in meters Extract Map Layer Coordinate System Information to Table Columns Yo kk ck ck KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK Sk Sk kv ko k kv ko ko kokockok Eos THE FOLLOWING MANIFOLD L THREAD GIVES THE BACKGROUND E THIS IS ADAM S SUGGESTION IN A SCRIPTED FORM un L Ketch April 9 2006 Yo kk ck ck Ck ck ck Ck Sk C Ck KC C Ck CC C Ck CC Ck Ck Ck Ck Ck Ck Ck Sk Kk kk Sk kk Sk Kk Sk kv M Sk ko ko ko ko ko ko ko kock ko Sent Thu 04 06 2006 5 19 PM From David Weinschrott david prodevassociates com i Toe manifold l lists directionsmag com Subject Manifold 1 Finding the bad apple I have a map I have been adding stuff to for a couple of weeks All of a sudden things have slowed down a lot My guess is that one of those layers has an odd projection In my understand In order to find the bad apple I have to find each of those layers in the project mnanager and check its projection Is there any other quicker way it would be cool to be able to put up a table that would list projections of each layer One could have a button that would change all layers to a selected projection but that is a bit drastic when you don t know whic
21. Comment l AddTex Comment l AddTex Comment l AddTex Comment l AddTex Comment l AddTex Comment l AddTex Cstr CoordSys ParmSet Comment l AddTex Cstr CoordSys ParmSet Comment l AddTex Cstr CoordSys ParmSet t Header amp VbCrLf amp VbCrLf t localScaleX amp Item localScaleX Value amp VbCrLf t Drawing name amp Drwg Name amp VbCrLf t CoordSys amp CoordSys Name amp VbCrLf t Datum amp CoordSys Datum Name amp VbCrLf t EllipsoidName amp CoordSys Datum Ellipsoid Name amp VbCrLf t CoordSys Units amp CoordSys Unit Name amp VbCrLf t localOffsetX amp Item localOffsetX Value amp VbCrLf t localOffsetY amp Item localOffsetY Value amp VbCrLf 294 Comment l AddText localScaleY amp Cstr CoordSys ParmSet Item localScaleY Value amp VbCrLf Comment l AddText ScaleCorrectionX amp Cstr CoordSys ParmSet Item ScaleX Value amp VbCrLf Comment l AddText ScaleCorrectionY amp Cstr CoordSys ParmSet Item ScaleY Value amp VbCrLf Comment l AddText FalseEasting o amp Cstr CoordSys ParmSet Item FalseEasting Value amp VbCrLf Comment l AddText FalseNorthing o amp Cstr CoordSys ParmSet Item FalseNorthing Value amp VbCrLf Comment l AddText majorAxis o amp Cstr CoordSys ParmSet Item majorAxis Value amp VbCrLf Comment 1 AddText Eccentricity amp Cstr
22. Nothing End Function DKK KKK KK KKK Ck Ck KKK KKK KKK KKK KKK KKK KKK KKK KKK ko kx ko ko Public Function scale2scaleInternal ByVal dScale As Double ByVal cmp As Component As Double Currently works for drawings and surfaces in meters Dim dDPI As Double getDisplayResolution Dim dInchInMeter As Double 0 0254 One inch is 0 0254 meter 1 1 scale gives a scaleInternal of dUnitsPerPixel Dim dUnitsPerDot As Double dInchInMeter dDPI Find what is the number of pixels unit for that surface Dim rectBB As Rect If cmp Type ComponentType ComponentSurface Then Dim surf As Surface cmp rectBB surf PixelSet Box Else rectBB cmp objectset box End If Dim cs As CoordinateSystem cmp CoordinateSystem Dim dLocalOffsetX As Double _ cs ParameterSet Item cs ParameterSet ItemByName localOffsetX Value Dim dLocalScaleX As Double _ cs ParameterSet Item cs ParameterSet ItemByName localScaleX Value RWU Real World Units m feet Dim dXMaxRWU As Double dLocalOffsetX rectBB XMax dLocalScaleX Width in Real World Units Dim dWidthRWU As Double dXMaxRWU dLocalOffsetX rectBB XMin dLocalScaleX Use offsets and scales of coordinate system to calculate pixel size Pixel size width of the surface in the used unit meter Dim dUnitPerPix As Double dWidthRWU rectBB Width Scale2scaleInternal dScale dUnitsPerDot dUnitPerPix End Funct
23. Prev Record Data Column Return valueToBeReturned The Prev variable is declared outside the function and is therefore global and retains its value through the iterations I haven t experimented much with this as I ve only needed it a couple of times for sequences so I m not sure what else is possible with the active column code Henry 12 Analyzer Object some of these examples can be found elsewhere in this document Select Touch All Objects in All Map Layers that Touch a Bounding Object Thank you so much I just made a couple little changes and it worked like a charm Sub Main Set ZActiveDoc Application ActiveDocument Set ZCompSet ZActiveDoc ComponentSet Set ZBoundBox ZCompSet Item Bounding Box Set ZAnalyzer ZActiveDoc NewAnalyzer for each layerl in ZCompSet Item Map LayerSet ZAnalyzer SelectTouching layerl Component layerl Component ObjectSet ZBoundBox ObjectSet next End Sub Explode Polyline http 69 17 46 171 Site Thread aspx 1d 27362 amp ti 632937183439630000 Art Lembo Provided a Script Version using the Analyzer Object Sub Main Set Drwg Application ActiveDocument ComponentSet Item Drawing Set Analyzer Application ActiveDocument NewAnalyzer Set Objs Drwg ObjectSet Analyzer Explode Drwg Objs End Sub Compute Shortest Distance from Point A to a Road http 69 17 46 171 Site Thread aspx id 19151 amp ti 632902448063970000 This was a pro
24. Save the associated component name to the 2nd dimension Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca Dim Index LastIndex WinSet Window Names TRUE Set WinSet Application WindowSet LastIndex WinSet Count 1 If LastIndex lt 0 Then Window Names False Exit Function End If ReDim WinNames 1 LastIndex For Index 0 to LastIndex WinNames 0 Index Index Window Index WinNames 1 Index WinSet Index Component Name Open Window for this Component name Next End Function 1 CkCckck ck Ck kk Ck Sk CK Ck Ck CC C Ck Ck Ck Ck Ck Ck CC Sk CK Ck Sk Ck Sk Ck Sk Ck Ck Ck Ck Ck Ck Ck Ck Ck Sk Ck Sk Sk Sk Kk Sk kv x ko kv Mk k ko ko ko ko kock 251 Close a Window Private Sub Close Window ByVal Comp Name Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca Dim Index LastIndex WinSet Set WinSet Application WindowSet LastIndex WinSet Count 1 For Index 0 to LastIndex If Ucase Comp Name Ucase WinSet Index Component Name Then WinSet Index Close Exit Sub End If Nex End Sub VK KKK KKK KK KKK KKK KKK KKK Ck Ck Ck KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KK ko Sk Sk Mk kx Sk ko ko ko ko kockok Unselect All Project Components typically used in Maps Private Sub UnSelect All Dim Comp Comps Dim Comp Type Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca General purpose
25. Set Comps Document Componentset If Component Exists ComponentNames Then Set Comment ComponentNames Comps Item ComponentNames Comment ComponentNames Clear Else Set Comment ComponentNames Document NewComments ComponentNames End If Application MessageBox Comps count Comment ComponentNames AddText _ 249 Document ComponentSet Count indicates that amp VbCrLf amp _ there are amp Comps count amp Components in this project amp VbCrLf amp VbCrLf ReDim ComponentNames 300 Counter 1 For each Comp in Comps Counter Counter 1 Comment ComponentNames AddText Comp Name Comment ComponentNames AddText VbCrLf ComponentNames Counter Comp Name If Counter Ubound ComponentNames Then ReDim Preserve ComponentNames Ubound ComponentNames 100 End If Next Redim Preserve ComponentNames Counter BubbleSort uCaseText ComponentNames FALSI Gl For Counter 0 to Ubound ComponentNames Comment ComponentNames AddText ComponentNames Counter Comment ComponentNames AddText VbCrLf Next Comment ComponentNames Open End Sub VK KK ck ck ck ck C ck Sk Ck Ck ck Ck ck Ck Ck C ck Ck ck Ck ck ck ck Sk ck ck Ck ck kk ck ck kk kk ck ck KK kk ck kk ck ko ck kk ck ko Sk ko Mk Sk Mk kx k ko ko ko ko kocko Retrieve Open Window Indexes and Names into dynamic array C Documents and Settings XLorne Limited My Documents Manifold VBscript Retrieve_OpenWindow_Names map
26. Set Report Comp Document NewComments Formatted Records Else Set Report Comp Comps Item Formatted Records Report Comp Text End If Last Col Index uBound Column Names Build the Column name string that will be used in the Query For Col Index 0 to Last Col Index If Col Index lt Last Col Index Then ColName String ColName String amp amp Column Names Col Index amp Else ColName String ColName String amp amp Column Names Col Index amp End If Next Ory Text SELECT amp ColName String amp FROM amp Source Table Name amp Ory Run Set Rcrds Qry Table RecordSet Set Cols Qry Table ColumnSet If fixed width columns were specified then find the width required for each column based upon the length of the longest entry in that column which might include the column name as well as the column data Also depends upon whether quotes are required around text fields If uCase Separator FIXED WIDTH Then Fixed Width True ReDim Column Widths Last Col Index For Col Index 0 to Last Col Index If Include ColumnNames Then If Quotes Then Column Width Len Column Names Col Index 3 232 Else Column Width Len Column Names Col Index 1 End If Else Column Width 0 End If Set Col Cols Col_ Index Add Quotes FALSE If Quotes AND Col Type ColumnTypeAChar OR _ Col Type ColumnTypeAText OR Col T
27. columnBirthDate atomYoung MakeHigh 0 1 atoms Add atomYoung set atomYoung atoms LastAdded 42 create Young link set entryYoung entries NewDSSQueryEntry entryYoung Atom atomYoung entryYoung Junction DSSJunctionAnd entries Add entryYoung create Experienced atom nItem columns ItemByName Hire Date set columnHireDate columns Item nItem set atomExperienced atoms NewDSSAtom atomExperienced Name Experienced atomExperienced Column columnHireDate atomExperienced MakeLow 0 1 atoms Add atomExperienced set atomExperienced atoms LastAdded create Experienced link set entryExperienced entries NewDSSQueryEntry entryExperienced Atom atomExperienced entryExperienced Junction DSSJunctionAnd entries Add entryExperienced create temporary column column Name Golden Mean columns Add column set column columns LastAdded reset selection for nItem 0 to records Count 1 set record records nItem record Mask record Mask and not 1 next create selection set selections records Maximum column ID for nItem 0 to selections Count 1 set record selections nItem record Mask record Mask or 1 next remove atoms and temporary column nitem atoms ItemByID atomYoung ID atoms Remove nItem nitem atoms ItemByID atomExperienced ID atoms Remove nItem table Open End Sub 4
28. roadShieldSmallBlack roadShieldSmall White roadShieldSmallWire roadShieldWhite roadShieldWire Wingdings 236 Wingdings 237 Wingdings 238 Wingdings 239 Wingdings 240 Wingdings 241 Wingdings 242 Wingdings 243 Wingdings 244 Wingdings 245 Wingdings 246 Wingdings 247 Wingdings 248 Wingdings 249 Wingdings 250 Wingdings 251 Wingdings 252 Wingdings 253 Wingdings 254 Wingdings 255 282 Object Model V7 Features and Changes Deselect Records New V7 SelectNone SelectAll amp Selectinverse Methods http 69 17 46 171 Site Thread aspx 1d 21452 amp t1 632838853471300000 I would like to deselect all records ie select none through code Steven coding in VBScript you would use VBScript Sub Main Set doc Application ActiveDocument Set comps doc ComponentSet Set theQuery doc NewQuery TempQuery False theQuery Text Update Cities SET Selection I False theQuery RunEx True comps Remove comps ItemByID theQuery ID End Sub Actually when using v7 there is a SelectNone method for tables which operates signifcantly faster than the sql method not to mention how much easier it is to code SelectNone as well as SelectAll and SelectInverse are available for Drawings Tables Surfaces and Images I ve replaced the query method with SelectNone on a surface in an addin it would take the query over 2 minutes to run while the SelectNone takes about 5 seconds Also I d like to
29. Adam suggested changing it to an Update query t theText UPDATE amp blockDrawing Name amp amp _ SET Selection I MACode amp theMA amp MAQuery Text theText MAQuery Run The Table Open not required if Adam s suggestion below is used Note No records selected unless table is Open displays each selection onscreen MAQuery Table Open Set selBlocks blockDrawing Selection Add dissolved polygons to separate drawing maObjects Add selBlocks GeomSet Union Set theRecord maRecords maRecords Count 1 theRecord Data MACode theMA Next Rewrite the SELECT query as an UPDATE query VBScript theText UPDATE amp blockDrawing Name amp SET Selection I MACode tu amp theMA amp we s Ww 228 Changing Drawing Area Colours and Themes http www georeference org Forums tabid 7 1 forumid 4 tpage 1 view topic postid 3227 Default aspx 3260 Sub Main Set doc Set drw Set fmt Application ActiveDocument doc ComponentSet Drawing drw AreaBackground forma Set set fmt tting Application NewColor 0 220 0 thema 220 set green fmt SetUniqueValues Name For Each val In fmt Values val Formatting Application NewColor green green 20 Nex tic formatting 0 set formatting using XML xml fmt LoadFrom xml End Sub green 0 If all you want is to copy it use
30. Application MessageBox Active component is not a drawing Exit Sub d If create temporary query component t components document ComponentSet t query document NewQuery Temp ery Text SELECT ID X I Y I FROM component Name WHERE ction I AND Type I 1 ORDER BY ID KLUDGE verbatim value of 1 in Type I 1 fragment filters out line and area objects Set table query Table ensure there are at least two records Set records table RecordSet If records Count 2 Then remove temporary query component components Remove components ItemByID query ID Application MessageBox There should be at least two selected points Exit Sub End If Set temppointSet Application NewPointSet 11 Set record records 1 Set point Application NewPoint point X CDbl record Data X I point Y CDbl record Data Y 1I tempPointSet Add point For recordIndex 0 to records Count 1 Set record records recordIndex Set point Application NewPoint point X CDbl record Data X I point Y CDbl record Data Y I tempPointSet Add point Next Set record records records Count 2 Set point Application NewPoint point X CDbl record Data X I point Y CDbl record Data Y I tempPointSet Add point create new point set object Set pointSet Application NewPointSet scan queried table adding lo
31. C Macromedia Flash Factory Object CWINDOWSlsys Shockwave Flash C MALUniversalltemListView Class PROGRA 1 COMMON 1 ROXIOS Manifold MapControl Obj ect Manifold MapControl Object C Program Files Manifold System Ex 1 C McAfee Virtual Technician Control C WINDOWS Downloaded Program MVT 1 0 Type Li Tab click the checkbox on C McAfee com drives list class c program files mcafee com shared mccomctl 1 0 Ty E McIWndx Control C WINDOWS system32 MCIWNDX O MCIWndX Control C MDPPlayer Class C PROGRA 1 Canon ZOOMBR 1 Pr MDP 1 0 type lib C Mediaview 1 41k Control C WINDOWS system32 MV141KN OCX Mediaview 1 41 N 2 Manifold MapControl Object Language Unknown Version 3 0 Click OK 76 5 LF References 2 AxManifold References will now show the 43 Manifold AxManifold Control 43 stdole 3 System C System Data 43 System Deployment 3 System Drawing C3 System Windows Forms 43 System Xml Adding a Map Component to a Lung d The Manifold control il PerformanceCounter should now be 4 Process available in the SerialPort Toolbox as shown to Hi ServiceController the left C3 Timer w It can be added to a Printing hk Pointer 3 PageSetupDialog C4 PrintDialog Form like any of the standard controls How to use the Manifold Object Model in VB 2005 project initial setup http forum manifold net Site Thread aspx id 3 1261 amp ti 633018
32. Col Col Col Set Cok Col Col Set mn Size Column mn Name mn Type mn Size m Column mn Name mn Type mn Size m Column mn Name mn Type mn Size m Column mn Name mn Type Column mn Name mn Type Column mn Name mn Type Column mn Name mn Type Column mn Name mn Type Column mn Name mn Type Column mn Name mn Type Column 100 mns Add Column Columns NewColumn Datum ColumnTypeWText 100 ns Add Column Columns NewColumn EllipsoidName ColumnTypeWText 100 ns Add Column Columns NewColumn CoordSys Unit ColumnTypeWText 50 ns Add Column Columns NewColumn mns Add Column mns Add Column localOffsetx ColumnTypeFloat32 Columns NewColumn localOffsetY ColumnTypeFloat32 Columns NewColumn mns Add Column localScaleX ColumnTypeFloat64 Columns NewColumn mns Add Column mns Add Column localScaleY ColumnTypeFloat64 Columns NewColumn ScaleCorrectionx ColumnTypeFloat64 Columns NewColumn mns Add Column ScaleCorrectiony ColumnTypeFloat64 Columns NewColumn mns Add Column FalseEasting ColumnTypeFloat64 Columns NewColumn 213 Col Col Col m m m Set Col Col Col Column m m m Set Col Col Col Column m m m Set Col Col Col Col Column m m m um Set n Name n Type ns Add Column n Name n Type n
33. ComponentTable Then check if active column is Date Set column window ActiveColumn If column Type ColumnTypeTime Then Set record window ActiveRecord valueActive CDate record Data column ID monthActive DatePart m valueActive yearActive DatePart yyyy valueActive loop through all records selecting those with same month Set records component RecordSet For nItem 0 To records Count 1 Set record records nItem value CDate record Data column ID If DatePart m value monthActive And DatePart yyyy value yearActive Then record Mask Else record Mask record Mask And Not 1 End If Next End If End If End Sub record Mask Or 1 Select Same to Active Sub Main Set windows Application WindowSet Set window windows ActiveWindow Set component window Component If component Type ComponentTable Then reset selection Set records component RecordSet For nItem 0 To records Count 1 Set record records nItem record Mask record Mask And Not 1 Next 38 create selection Set column window ActiveColumn Set record window ActiveRecord value record Data column ID Set selections records EqualTo column ID value For nitem 0 to selections Count 1 Set record selections nItem record Mask record Mask Or 1 Next End If End Sub Table Nwind adds a relation between Categories and Products Add Relation between C
34. Loop End If CalcAngleRadians Degs 0 01745329252 End Function return radians VK KKK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Approach 2 http 69 17 46 171 Site Thread aspx id 20702 amp ti 632819309105000000 It is amazing how often this comes up Here is a version I wrote ages ago when I was using the 6 50 beta It should probably be refactored and maybe even turned into an addin given its popularity Eh maybe when I find some time Sub Main Set app Application Set doc app ActiveDocument Set comps doc ComponentSet drawingName app InputBox Enter drawing name Drawing dist app InputBox Enter distance spacing native units 100 Set linesQuery doc NewQuery Templ false Set bLengthQuery doc NewQuery Temp2 false Set pointQuery doc NewQuery Temp3 false linesQuery Text _ SELECT ID Branches I amp VbCrLf amp _ 202 A FROM amp drawingName amp amp VbCrLf amp _ WHERE Type I IN 2 bLengthQuery Text Parameters l1ID int bID int amp VbCrLf amp _ SELECT LENGTH BRANCH 1ID bID amp VbCrLf amp Pa FROM amp drawingName amp amp VbCrLf amp _ WHERE ID lID pointQuery Text Parameters lID int bID int dist int INSERT INTO amp drawingName amp geom i amp
35. PtsCount CInt Stream ReadLine End If Set Pts Application NewPointSet for j 0 to PtsCount 1 TextLine Stream ReadLin Location Split TextLine Set Pt Application NewPoint Pt X CDb1 Location 0 Pt Y CDbl Location 1 Pts Add Pt Next Brs Add Pts create object If ObjType Point Then Drawing ObjectSet Add Application NewGeom GeomPoint Brs ElseIf ObjType Line Then Drawing ObjectSet Add Application NewGeom GeomLine Brs ElseIf ObjType Area Then Drawing ObjectSet Add Application NewGeom GeomArea Brs End if Next Loop close file Stream Close open imported drawing 54 Drawing Open Else Application MessageBox File not found End if End Sub Tranfer Selection select Pixels under selected objects Select Pixels under Selected Objects Modifies selection within Vatican Image image to match that in Vatican drawing Sub Main Set Components Document ComponentSet obtain image and drawing Set Drawing Components Components ItemByName Vatican Set Image Components Components ItemByName Vatican Image set up coordinate converter Set SystemImage Image CoordinateSystem Set SystemDrawing Drawing CoordinateSystem Set Converter Application NewCoordinateConverter Converter Prepare SystemImage SystemDrawing Set Point Application NewPoint Set Pixels Image PixelSet Set SelectedObjects Drawing Selection
36. SalesData Drawing 2 Selection I amp _ FROM Neighborhood Drawing SalesData Drawing 2 amp _ WHERE Contains Neighborhood Drawing ID amp _ NewPointLatLon SalesData Drawing 2 Longitude 1 SalesData Drawing 2 Latitude I amp _ AND Neighborhood Drawing NeighbNum amp cStr I amp SET SalesData Drawing 2 Selection I TRUE Ory Run Sfc Copy TRU Gl Application StatusText Pasting Surface f amp cStr I amp of amp cStr LastSurface Gl surfaceCmpst Paste TRU surfaceCmpst SelectNone 262 Drwg SelectNone CompSet Remove CompSet ItemByName SalesData Drawing 2 SaveAs below will save the project from within this loop but appears to cause a problem later after the the script has finished If I lt 4 Then Document SaveAs ActiveDoc Path Next CompSet Remove CompSet ItemByName TmpQuery End Sub chrismarx on 12 22 2006 10 05 PM 32674 I ve found that I sometimes get different results 1f I run the script under the debugger or without sometimes one is better than other Also you may want to include some sleep statements between some of sendkeys that may help Here s a little function you can put into your script Function Sleep t dim dtGoal dtgoal DateAdd s t Now do while dtgoal Now Loop End Function I usually call sleep 5 if I feel that particular menu or whatever needs sometime However I ve found tha
37. VbCrLf amp u M SELECT LINEPOINT BRANCH 1ID bID dist amp VbCrLf amp E n FROM amp drawingName amp amp VbCrLf amp _ W WHERE ID l1ID For each rec in linesQuery Table RecordSet For x 0 to rec DataText Branches I 1 bLengthQuery ParameterSet Item 0 Value rec DataText ID bLengthQuery ParameterSet Item l Value x bLength bLengthQuery Table RecordSet Item 0 Data Column For j 0 to Int bLength dist za pointQuery ParameterSet Item 0 Value rec DataText ID pointQuery ParameterSet Item 1 Value x pointQuery ParameterSet Item 2 Value dist j 1 pointQuery Run Next Next Next comps Remove linesQuery comps Remove bLengthQuery comps Remove pointQuery End Sub Find Coordinates of Inflection Points along a Line http www georeference org Forums tabid 7 1 forumid 2 tpage 1 view topic postid 2074 Default aspx 2075 04 21 2004 5 24 AM Shows how to interrogate a line point set and return values Sub Main Set doc Application ActiveDocument Set comps doc ComponentSet Set comp comps Drawing Set objSet comp ObjectSet Set obj objSet 0 203 If obj Type ObjectLine Then Set branch obj Geom BranchSet Item 0 Set pts branch PointSet Application Messagebox This many points in point set amp pts Count Application Messagebox Coordinates of first point amp vbcrlf amp X amp _ CStr pts 0 X
38. ViewZoomNative ViewZoomOut ViewZoomTo ViewZoomToFit WindowCascade WindowClose WindowCloseAll WindowNew WindowNext WindowPrevious WindowTileHorizontally WindowTileVertically Window Windows Window WindowsActivate Window WindowsCascade Window WindowsClose Window WindowsTileHorizontally Window WindowsTileVertically 275 Preset Definintions Distance and Area Units Extracted from xml at http www manifold net products mfd50pro Units xml Name Nickname Nickname Area Value Lat Long Arc Minute arcmin sq arcmin 1 666666666666666600000000e 002 True Arc Second arcsec sq arcsec 2 777777777777777800000000e 004 True Arshin arsh sq arsh 7 112000000000000500000000e 001 Benoit Chain A ch BenA sqchBenA 2 011678240000000200000000e 001 Benoit Chain B ch Ben B sq ch Ben B 2 011678249437590100000000e 001 Benoit Foot A ft Ben A sq ft Ben A 3 047997333333329900000000e 001 Benoit Foot B ft Ben B sq ft Ben B 3 047997347632709900000000e 001 Benoit Link A In Ben A sq In Ben A 2 011678240000000000000000e 001 Benoit Link B In Ben B sq In Ben B 2 011678249437590100000000e 001 Benoit Yard A yd BenA sqydBenA 9 143991999999999700000000e 001 Benoit Yard B yd BenB sq yd Ben B 9 143992042898120300000000e 001 Cable ca sq ca 1 853129999999999900000000e 002 Centimeter cm sq cm 1 000000000000000
39. age Hanis AnalyzerValueSet AnalyzerValue RENS Hero i MESE see beside i DatumSet Datum see beside Option EllipsoidSet Ellipsoid see beside UnitSet Unit see beside Nero G d G deMatchSi Gi deMatch or any other Legend Geocoder GeocodeMatch i 7 eocoder eocodeMa el eocodeMatcl ActiveX Control Collection i Collection Item P rogress 2006 CDA International Ltd All Rights Reserved Manifold is a registered trademark of CDA Programming Basics A topic to introduce basic concepts and terminology used to program using Manifold scripting http www georeference org DNN3 1 KnowledgeBase Articles ProgrammingBasics tabid 86 Def ault aspx Manifold provides scripting support via Microsoft s ActiveX scripting environment from with the Manifold program and via a Manifold System Type Library from other programming environments This topic will concentrate on the scripting environment The Very Basics Programming basic terminology is assumed If you are not at all familiar with programming obtain an entry level text on that use VBScript or VBA as the introductory language In a learn by doing methodology start Manifold and import a simple drawing name it Drawing for use with this tech topic Create a script object via the Project Window and open it Sub Main Application MessageBox Hello World End Sub flo Click the Run or Run Under Debugger icon on the main toolbar Hello World Messag
40. amp vbcrlf amp Y amp CStr pts 0 Y End If End Sub Creating Track with different point format for start and end interesting code for making lines etc Rusty sg 03 15 2005 7 52 PM http www georeference org Forums tabid 7 1 forumid 4 tpage 1 view topic postid 8000 Default aspx 8000 Y kk kk Ck Ck Ck Ck kk Ck Ck Ck Ck 0k kk Ck Ck Ck Ck kk Ck Ck Ck Ck ck kk Ck Ck kk Ck kk ko Sk Sk kx kx Gk ko ko ko ok ok Sub Main dim strSQL Create the SQL statement for the chosen shark strSQL Select SGT Date SGT Latitude 1 AS Latitude SGT Longitude SGT IDj strSQL strSQL amp FROM T SightingDetails strSQL strSQL amp WHERE Shrk ID 505 strSQL strSQL amp ORDER BY SGT Date application messagebox strSQL Use the SQL statement in creating a query with positions and dates for Bomber Set components Application ActiveDocument ComponentSet SET Query Application ActiveDocument NewQuery Bomber query Text strSQL Make a table for the data from the query SET Table query table Call CreateLines to join the lines CreateLines Table Call TaggingOp to mark the position of tagging TaggingOp Call LastKnownPos to mark the last known position of the shark LastKnownPos END SUB VK KKK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK SUB CreateLines tbl Cre
41. circle circleBorder circleCenter circleDot circleDotDotDot circleOver Cold Front cross crossProper dash3 dash3 Wide dash4 dash4 Wide dash5 dash5Dot dash5DotDot dash5DotDotDot dash5Wide dash6 dash7 dash8 dash9 diamond diamondCenter diamondDot diamondDotDotDot diamondOver diamondProper dot dotWide dotWideX dotWideXX double Occulsion railway railwayHollow railwayLong sideArrow Table V7 Point styles Aug 12 2006 arc arcClosed arrowB arrowL arrowLB arrowLT arrowR arrowRB arrowRT arrowT box boxBDark boxCross boxCrossX boxDot boxDouble boxF boxFDark boxFDarkRev boxFull boxG boxGDark boxGDarkRev boxH boxLDark boxRDark boxSpot boxTDark boxV brick centimo chart chart12 chart25 sideArrowOver sideArrowOverRev sideArrowOverSymm sideArrowRev sideArrowSymm sideBump sideBumpRev sideBumpSymm sideTick sideTickRev sideTickSymm solid ticks ticksOver ticksPro ticksWall triangleProper triangleRevProper Trowal Warm Front wave xCross xCrossOver xCrossProper chart37 chart50 chart62 chart75 chart87 circle circleBDark circleCity circleCityX circleCross circleCrossX circleDot circleDouble circleF circleFDark circleFDarkRev circleFull 219 circleG circleGDark circleGDarkRev circleH circleLDark circleRDark circleSpot circleTDark circleV colon cone coneDark cross crossH crossS crossX crossXM cruzeiro diamond diamondBDark diamo
42. drilling down the objects until you come to some text manapp DefaultCoordinateSystem Name Orthographic Note that for this to work you will have had to step into the code and gone past the point where manApp is set to Manifold Application in the script used above Locals Window Stop the execution of the code by hitting the Reset button on the toolbar Click the menu View Locals Window place the mouse cursor in the code and press F8 The values will fill in as you step through the code d You can drill down to see the values of Application Application Document Document thousands of properties A NET UR PUT TAE A window like this one is available in Manifold the Variables Pane I believe you must have the Debug Option to see the Variables Pane Done for now Save your work for the next article Exploring the Manifold Object Model The code you develop can be copied and pasted into Manifold scripts with a few modifications VBScript supports Option Explicit and the Dim statement but not the As clause Option Explicit deemed is still recommended to avoid minor MsgBox manApp FullName typos from creating hard to find errors For example if Option Explicit is off Nik SECUS code errors like this one can be hard to Set manApp Exit Sub debug z Dim manApp Set manAppp Application Application MessageBox manApp FullName Note the two different spellings of 94 manApp The Applicati
43. eg a drawing or a table and sometimes to the script object itself eg an ObjectSet or a RecordSet When the property was bound to a physical object such as when adding objects to a drawing it was possible to add data to one script object an ObjectSet and retrieve added data using another script object a RecordSet This was making the implementation of the script objects that had to reconcile changes with each other unnecessarily complex and slow and was making it very difficult to use the LastAdded property in multi threaded scenarios So In 7 00 the LastAdded property is always bound to the script object exposing it That is if you add a record to a RecordSet object you can only access the added record using the exact same RecordSet object you used to add the record If you create a new RecordSet object it will not return the added record in the LastAdded property even if bound to the exact same physical table component Similarly if you add an object to an ObjectSet object you can not retrieve the record for that object using the LastAdded property of the relevant RecordSet object You should use the LastAdded property of the ObjectSet object to retrieve the added object and locate the record for that object using other means Let me know if this sounds Chinese Dumping V7X Formatting Options Style Lists Manifold System 7x Release Notes http www manifold net updates release_notes_7x htm The command line has been
44. layerList 0 Layer Coordenadas layerList 1 Monumentos Layer Monumentos layerList 2 Layer Nomes dos Monumentos 182 layerList 3 Hoteis Layer Hoteis layerList 4 Layer Nomes dos Hoteis layerList 5 Estabelecimentos Layer Estabelecimentos layerList 6 Layer Nomes dos Estabelecimentos layerList 7 Layer Nomes das Ruas layerList 8 Ruas Layer Ruas var layerSqno 0 var layerItem for layerItem in layerList if layerLi st layerItem l layerChck parameter layer layerSqno layerDefv if layerChck layerChck checked if layerList layerItem Monumentos layersC layersC lt input id layer layerSqno name layer layerSqno V layerChck type checkbox onclick invokePane layers gt An An encode layerList layerItem Mn if layerList layerItem Estabelecimentos layersC layersC lt input id layer layerSqno name layer layerSqno SN layerChck type checkbox onclick invokePane layers gt An An encode layerList layerItem An if layerList layerItem Hoteis layersC layersC lt input id layer layerSqno name layer layerSqno V layerChck type checkbox onclick invokePane layers gt An
45. records Count 1 For columnIndex 0 To dataColumns Count 1 Set dataColumn dataColumns columnIndex record Data dataColumn Name dataRecord Data dataColumn Name Next Next drawing Open End Sub 26 Sequential Lines joins points selected within the active drawing window with a line Join Selected Points Joins points selected within the active drawing window with a line The order of points on a line is determined by their IDs Sub Main Set windows Application WindowSet fail if there is no opened windows If windows Count 0 Then Application MessageBox No active window Exit Sub End If Set window windows ActiveWindow Set component window Component fail if active component is not a drawing If component Type ComponentDrawing Then Application MessageBox Active component is not a drawing Exit Sub End If create temporary query component Set components document ComponentSet Set query document NewQuery Temp query Text SELECT ID X I Y 1 FROM component Name WHERE Selection 1 AND Type I 1 ORDER BY ID KLUDGE verbatim value of 1 in Type I 1 fragment filters oe out line and area objects Set table query Table ensure there are at least two records Set records table RecordSet If records Count lt 2 Then remove temporary query component com
46. 1 Ck ck kk kk S S Sk S Sk Sk Sk kk kk kk kk kk kk kk kk kk kk S kk kk Sk kk kk kk kk x kx x x x Private Function Duplicate Component _ ByRef Original Comp _ ByRef Duplicate Selection Comp Pass a Manifold Component Object to this routine The Comp will be duplicated using a Copy Paste operation E Duplicate Selection TRUE Copy the Component Selection only and create a new component based upon that selection If there is no Selection then the process fails FALSE Reproduce the entire component E 244 NOTES 1 Not all Components allow a Selection copy In fact some do not provide a Copy Method Summary below 2 Manifold will assign a default name to the copy The user can change this later if required Type Enumeration Allows Selection Copy Chart ComponentChart False Comments ComponentComments False Drawing ComponentDrawing True Elevation ComponentElevation False Folder ComponentFolder No Copy Method Form ComponentForm No Copy Method Image ComponentImage True Labels ComponentLabels True Layout ComponentLayout True Map ComponentMap False Invalid ComponentNull Typically used in initialization Palette ComponentPalette True Profile ComponentProfile False Query ComponentQuery False Script ComponentScript False Surface ComponentSurface True Table ComponentTable True Terrain ComponentTerrain False Zones ComponentZones No Copy Method Backgrou
47. 1 kk ck ck ck ck ck Ck Ck Sk Ck Ck ck Ck Ck Ck Ck Ck Ck kk ck ck ck Sk ck ck kk ck Ck ck ck kk kk ck kk ck ck ck kk ck kk ck ko Sk ck Sk Sk ko Mk Sk Mk kx k ko ko ko ko kocko Option Explicit 1 kk ck ck ck ck ck Ck Ck Sk Ck Ck Ck Ck Ck Ck Ck ck Ck Sk Ck ck ck kk kk ck ck ck Ck ck ck Ck ck kk ck ck kk ck kk ck ck kk ck ko Sk ck Sk Sk ko ko Sk Mk kx k ko ko ko ko kockok Sub Main Dim WinNames Dim Index LastIndex Dim Report Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca Close Window Query Exit Sub Report If Window Names WinNames Then LastIndex uBound WinNames 2 250 If LastIndex 0 Then Report One Window is Currently Open amp VbCrLf Else Report LastIndex 1 amp Windows are Currently Open amp VbCrLf amp VbCrLf amp Window Index Component Name amp VbCrLf amp _ End If For Index 0 to LastIndex Report Report amp VbCrLf amp WinNames 0 Index amp WinNames 1 Index Next Application MessageBox Report Else Application MessageBox No Open Windows End If End Sub 1 Ckokckck ck ck ck ck ck kk Ck Ck Ck Ck C Ck Ck Ck KC Ck Ck Ck Ck Ck Sk Ck ck kk Ck kk Ck ck kk Ck kk Ck ck kk Ck kk ko ck kk kx Sk kv Sk ko k kx ko ko Private Function Window Names ByRef WinNames WinNames is dynamic array which will be initialized in two dimensions Look at all currently open windows Save the WindowSet Number to the 1st dimension
48. 13 Create CentFolds usc t ter teen diserte pes Bae i see eem eae aen senectae eo Pan 13 Create Weighted Centroids i t tete tede er te ete cues urea Perpetuo dues eeu 15 COORDINATE SYSTEMS REPORTS THE NUMBER OF OBJECTS AND COORDINATE SYSTEM OF EACH DRAWING INTO THE NEW COMMENTS COMPONENT cccssscesscecssccesscecaccesneecsuecsneecsueceeneecsaecsceecsaeceneecsaeceeeeecsaeceeneecsaeeeeeeecsaeceaeees 16 RODOVE E 16 Change Projection to Mercator ettet e te t crede iie deat nei oed repe redi sioleanaee 17 COPY CREATE COPYING FROM ONE DRAWING TO ANOTHER CREATING A RECORD IN A TABLE eene 18 Copy all objects from A to B transferring field Name eene enne 18 GITE 18 COPYOBJECTS COPY A SELECTION TO A NEW DRAWING cssccessceceteceenceceaeeceececeaeceeeecsaeceeaeecsueceeeecaeceeeeecaecenees 19 FORMS DEMONSTRATES THE USE OF SEVERAL BASIC FORM CONTROLS esses enne 20 HELLO JSCRIPT PEARL PYTHON VBSCRIPT escecessceescecseeeenecesueceeneecsaeeseneeceaeceeneeceaeceeneecsaeceeneesaeeeeneecnaaeenees 21 J SCHDI S ULM Dr M LM UN MM 21 COT USS OVID esas ts ccs A ete fA LIA Lo um AEn ELI E E 21 PUhon SCD S cts to Mal NA MULIER C Ln M C ea 21 VBS CHU A EE tec fester a atcha M I LE Me 21 IMPORT FOLDER VBSCRIPT IMPORTS ALL MID MIF PAIRS IN A FOLDER AND SUB FOLDERS eere 22 NDVI COMPUTES NORMALIZED DIFFERENCE VEGETA
49. Branch PointSet i lenTo ptl DistanceTo pt2 If legLen lenTo mpLength Then legLen legLen lenTo Else next milepost in this segment angleTo CalcAngleRadians pt1 pt2 Set postPt pt1 prime bal lenTo Do While bal legLen gt mpLength distance mpLength legLen legLen 0 Set fromPt postPt Set postPt Application NewPoint postPt X fromPt X distance Sin angleTo postPt Y fromPt Y distance Cos angleTo drawingOut ObjectSet Add Application NewGeom GeomPoint postPt bal bal distance Loop legLen bal legLen record remaining distance End If Next i Next Application Messagebox done End Sub VK KKK KK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK ko kx ko ko kx kx ko ko Function CalcAngleRadians ByRef FromPoint ByRef ToPoint 201 Dim Rads Degs If FromPoint Y Degs 90 ElseIf FromPoint Y Degs 90 ElseIf FromPoint Y ToPoint Y Then Degs 0 points are coincident Else Rads Atn ToPoint X FromPoint X Degs Rads 180 3 1415926536 If FromPoint Y ToPoint Y Then Degs 180 End If Degs Do While Degs 180 Degs Degs 360 Loop Do While Degs 180 ToPoint Y And FromPoint X ToPoint X Then ToPoint Y And FromPoint X ToPoint X Then ToPoint Y FromPoint Y convert to degrees expand to four quarters protect from underflow Degs Degs 360 protect from overflow
50. CATEGORIES AND PRODUCTS c sescecesrceseeeeeseeetesecaevenenaeeneaeeneeaes 39 Add Relation between Categories and Products seen 39 Clean Up Opened Table iced io decade taco oe Pe deed oe ehe Sa oan eae aes 40 Sales by Cities Report A dais b dede ce ood rd ce e eere reete eae ad ebat eant 40 Select Products by User Category us a te t du e teet e e ae teet 41 Select Young Yet Experienced Employee sese ee eene ener nre 42 TABLE NWIND FORMS WALKS THROUGH CATEGORIES DISPLAYING LIST OF PRODUCTS FOR CURRENT CATEGORY 44 Category VIeWer o o ee eoe site ih Los cttm rd sot roa eo bee rte eec leue e one Tu SN 44 Employee VIEW e ict toe n t e D o ee ERU NIE se pee copo a th Sa deer E eee 46 TEXT FORMATS UTILITIES FOR READING DATA FROM SIMPLE ASCII FORMATS cessere 48 Export Released45 Text File ced et I e RUN to ee ete reiten doces 48 EXD OVE Lex PUG s oo eicere estt ote Lee tete o tao ore AR IM cta iu cesta te deli 49 Import Release45 Network File esee i ennt eede ia r entente enne nennen 51 Import Release45 Text File i void a ea e Her reU ee UD e ORE iT 32 Import Text Pile oec depeseduoi OI OP aban say OE E Feet ee e dan RENNES QE 53 TRANFER SELECTION SELECT PIXELS UNDER SELECTED OBJECTS cessent eene rene ne nne 25 Select Pixels under Selected Objects eese eene eene nein etre enne enne 55 Select Pixels with 50 Meters of Selected Objects
51. Column Name Table Column Type ColumnTypeAText If Comps ItemByName Drawing Names lt 0 Then Create a new Table Set Cols Application NewColumnSet Set Col Cols NewColumn Col Name Name Col Type ColumnTypeWText Cols Add Col Set Tbl Document NewTable Drawing Names Cols TRUI Set Rcrds Tbhl RecordSet Else Set Tbl Comps Item Drawing Names Delete any existing records Set Rcrds Tbl RecordSet Rcrds RemoveAll End If E u Collect Drawing component names minus the Drawing For Each Comp in Comps If Comp Type ComponentDrawing Then Rcrds AddNew If Len Comp Name gt 8 And uCase Right Comp Name 8 DRAWING Then Rcrds LastAdded Data Name Left Comp Name Len Comp Name 8 Else Rcrds LastAdded Data Name Comp Name 305 End If End If Next End Sub PKK KKK KKK KKK KKK KK KKK KKK KKK KKK KK Ck Ck KKK KKK KK KKK KKK KKK KK KKK KKK KKK HK ColinD on 12 11 2006 1 06 PM 31862 Thanks Lorne It s only when someone else reads a post that you realise that you as the original poster knew but didn t properly say what you meant What I meant to say was that I needed each drawing name to be put into a new column in that same drawing The reason being that I am creating a single drawing of common bounding boxes for each individual drawing and want the name to automatically come into the boxes table creating a tile index for the drawings Opt
52. Comps Count 2 Component Comp FALSE hen Comps Item New Index R crds Coun t AfterPaste Selections Not Allowed Msg Attempt to duplicate component amp Original Comp Name amp failed amp VbCrLf amp VbCrLf amp Function Duplicate Component Duplicate Component Tf End If Original Comp Original Comp Original Comp Original Comp Application You are Original Comp Nam Exit Functio EE Original Com Original Com Original Com Original Com Original Com Original Com Original Com Original Com O O O O O O O O Type Type Type Type Messagebox FALSE Com Com Com Com ponentFolder Or ponentForm Or _ ponentNull Or _ ponentZones Then EX attempting to duplicate MELLE n Type Type Type Type Type Type Type Type Com Com Com Com Com Com Com Com e amp Type amp Original Comp TypeName amp amp VbCrLf using a Copy and Paste methodology However there amp VbCrLf amp Lhere is no COPY m Function Duplicate Component _ Error MessageBoxTypeOK OR MessageBoxTypeSystemModal ethod for this component type amp VbCrLf amp VbCrLf amp ponentChart OR _ ponentComments OR _ ponentElevation OR _ ponentMap OR _ ponentProfile OR ponentQuery OR ponentScript OR ponentTerrain Then t ct Selections Not Allowed TRUE Else
53. CoordSys ParmSet Item Eccentricity Value amp VbCrLf amp VbCrLf Comment l AddText Number of amp Selected Objects amp VbCrLf amp Objs Count amp VbCrLf amp Comment 2 Clear Comment 2 AddText Header amp VbCrLf amp VbCrLf Else Application Messagebox amp DrawingName amp _ does not contain any amp Selected Objects amp Form Visible TRUE Exit Sub End If Last Index Objs Count 1 Examine each object For Obj Index 0 To Last Index Se Se Obj Objs Item Obj Index Obj Geom Obj Geom Object Type Obj TypeName Object ID cStr Objs OwnerComponent OwnedTable RecordSet Obj Index Data ID Comment l AddText Object Type amp Object Type amp VbCrLf Comment l AddText Object ID amp Object ID amp VbCrLf Comment l AddText Number of Branches amp Obj Geom BranchSet Count amp VbCrLf For Branch Index 0 to Obj Geom BranchSet Count 1 Comment l AddText Branch amp Branch Index amp amp VbCrLf Look at each Branch in the Branch Set Set Obj Branch Obj Geom BranchSet Item Branch Index Get the point set for this particular branch Set Pts Obj Branch PointSet Get the point coordinates for this Point Set For Point Index 0 To Pts Count 1 Set Pt Pts Item Point Index Formatted Str Format Coordinates Pt X Pt Y 295 Commen Next Next MaxX WholeNumbe
54. Drawing has some lines in it some of which intersect t first reports the number of intersections the count property of the GeomSet returned by IntersectionPoints and then the 195 coordinates of the first point in that set Sub Main Set doc Application ActiveDocument Set comps doc ComponentSet Set comp comps Drawing get the Objs in the drawing assuming all are lines here Set Objects comp ObjectSet get the intesection points Set pts Objects GeomSet IntersectionPoints is precision an issue eps 0 1 Set pts Objs GeomSet IntersectionPoints eps report Application Messagebox pts count Set aPt pts Item 0 Center Application Messagebox X amp aPt X amp vbcrlf amp Y amp aPt Y End Sub ELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLEL Option Explicit Author Lorne Ketch NOTE Highly modified version of Mike Sumner s code obtained from http www georeference org Forums tabid 7 1 forumid 4 tpage 1 view topic postid 2436 Default aspx 2440 lELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Sub Main Dim Comp Comps Dim Pts Apt Objs Counter Dim Report Dim ReportWin Comment Intersections Dim Comment Dim NumberOfLines NumberOfPoints Dim PointDrawing PointObjects Set Comps Document ComponentSet 196 Set Comp Comps Drawing get the Objects in the drawing assuming all ar
55. Excel VBA that evaluates the projected components not all types as of yet and places a report in the Immediate Window Option Explicit Tools Reference Manifold Type Library required Sub ProjectionReport Dim manApp As Manifold Application Dim manDoc As Manifold document Dim comp As Manifold Component Dim components As Manifold ComponentSet Dim report As Manifold Comments Dim index As Integer Dim system As Manifold CoordinateSystem Dim box As Manifold rect Dim printBox As Boolean Dim objects As Manifold ObjectSet Dim params As Manifold CoordinateSystemParameterSet Dim s As String Dim I As Integer Set manApp New Manifold Application supply your document path or use Appplication GetOpenFileNAme from Excel Set manDoc manApp DocumentSet Open D NGIS DataNScriptsNScriptingTutorial map True Set components manDoc ComponentSet Debug Print manDoc Name amp vbCrLf Debug Print manDoc Path amp vbCrLf Debug Print Now amp vbCrLf Debug Prant ec amp vbCrLf traverse project components For index 0 To components Count 1 Set comp components index Select Case comp TypeName Case Drawing Surface Map Image ignore others Debug Print vbCrLf amp comp TypeName amp amp comp Name amp vbCrLf Debug Print Note amp comp Note amp vbCrLf 106 Debug Print Description Select Case comp
56. Format SaveToFile and Format LoadFromFile Sub Main Set doc Set drw Set fmtSrc Set fmtTgt Application ActiveDocument doc ComponentSet Drawing drw AreaBackground drw AreaForeground fmtSrc SaveToFile c fmt xml fmtTgt SetUniqueValues Name fmtTgt LoadFromFile c fmt xml End Sub This also works Sub Main set theComponentSet Application ActiveDocument set theDrawing theComponentSet Item Ag Census set datacolumn theDrawing OwnedTable ColumnSet Application Messagebox datacolumn name set fmt theDrawing AreaBackground breaks 10 fmt SetEqIntervals datacolumn breaks theDrawing Refresh ComponentSet Data Item data 229 End Sub Convert Table Query to Delimited Text Stored in Comments Component Highly modified version of mdsumner and VON examples found at URL below See C Documents and Settings Lorne_Limited My Documents Manifold VBscript TableQuery 2 DelimitedText map http www georeference org Forums tabid 7 1 forumid 4 tpage 1 view topic postid 12575 Default aspx 12599 Option Explicit Author Lorne Ketch NOTE Idea stems from MIKE SUMNER S example found at the URL below Many options added http www georeference org Forums tabid 71 forumid 4 tpage 1 view topic postid 12575 Default aspx 12599 Yo kk ck ck KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko Sk ck Sk ko ko ko k ko ko ko kokok Sub Main Dim Table
57. HEH oe Turn this section off if you have no height data n in your drawing Obtain the height value from the 54 surface this is mostly so you can make it more g than zero if desired Win CameraHeight Rcrds Rcrds ItemByID Obj ID Data htColumnName zOffset 2 HEHEHE HH EH HH RR EE EE HE HEE EE EE EH EE EE EE EE EE EE EEE EH Create a new point and move the window view to it and refresh Set nPt Application NewPoint nPt X Obj Geom Center X nPt Y Obj Geom Center Y Win MoveToLocation nPt FALSE Win Refresh waste some time Delay waitThisLong If waitThisLong 0 Then Delay waitThisLong End If Next End Sub 1 Ckok ck ck ck kk Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck Ck Ck Ck kk ck kk kk kk Sk kk kx Kk kv ko kx ko kx ko ko Function Delay Wait A function to waste the specified number of seconds Dim StartTime EndTime WaitTime 132 Get Start Time StartTime Timer Get End Time EndTime Timer Determine how long it took WaitTime EndTime StartTime Continue checking th lapsed time until it reaches wait seconds Do While WaitTime Wait Get End Time EndTime Timer Determine how long it took WaitTime EndTime StartTime Loop End Function 1 Ckok KKK kk Ck Ck Ck Ck Ck Ck Ck Ck kk Ck Ck kk Ck Ck Ck kk Ck kk Ck kk Ck Ck kk Ck Ck kk kk kk kk ko Sk kk ko Mk kv ko ko ko ko ko ko Terrain Fly Through Save the X Y and Z Fl
58. IC KK CK CK CI I I A KK KU KK KK KG KG KG KG KK Kk ko ko ko ko ko Sub Main Dim Comps Ory Dim Tpl Col Cols Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca Set Comps Document Componentset Make sure the Query component exists If Comps ItemByName Query lt 0 Then Set Ory Document NewQuery Query Else 311 Set Ory Comps Item Query Set Set For Col Name amp Nex End If Tbl Comps My Table Cols Tbl ColumnSet Each Col in Cols If Not Col IsIntrinsic And _ Not Col Identity And _ Col Type ColumnTypeAText OR Col Type ColumnTypeWText Then Qry Text Update amp Tbl Name amp Set amp Col Name amp TRIM amp Ory RunEX TRUE End If End Sub VK KKK ck ck ck Ck Ck Ck Ck Ck Ck Sk Ck Ck Sk Ck Ck Sk Ck kk Ck Ck kk Ck Ck kk Ck kk Ck KKK Ck kk Sk ck kk Sk kk ko Sk kk ko ko kv ko ko kx ko ko ko Create a Drawing from a Table that Contains a Manifold Geometry Column http forum manifold net Site Thread aspx id 31021 NOTE The code below was not posted This version automatically extracts the coordinate information from the first record of the table and uses it to build the new drawing See C Documents and Settings Lorne_Limited My Documents WanifoldWVBscript CreateDrawing FromTable map 1 kkxkxkxkxkxkxkxkkkxkxkxkkkkxkkkkkkkkkkkkkxkkkkkkkkkkkkkkkkkkkkkxkkkkkkkkxkkkkkkkkkkkkxkxkxx k Private
59. If Report Type lt gt ComponentComments Then Application MessageBox Comments component required Exit Sub End If End If Report Report Report Report reset component text AddT AddT i n Report Text append report header Report Report ext Report amp vbCrLf ext amp vbCrLf AddText vbCrLf AddT n ext Date amp CStr Now AddText vbCrLf n AddT ext vbCrLf 16 traverse project components For Index 0 To Components Count 1 Set Component Components Index Component TypeName Drawing Then Set Objects Component ObjectSet Set System Component CoordinateSystem If Next append drawing to report Report AddText Component Name amp vbCrLf Report AddText number of objects amp CStr Objects Count amp vbCrLf Report AddText coordinate system amp System Preset amp vbCrLf Report AddText coordinate system base amp System Name amp vbCrLf End If Report Open End Sub Change Projection to Mercator Projects Sub Main European Cities to customized version of the Mercator projection locate European Cities Set Components Application ActiveDocument ComponentSet DrawingIndex Components ItemByName European Cities If DrawingIndex lt 0 Then Application MessageBox European Cities drawing not found Exit Sub End If Set Drawing Comp
60. KMLText AddText description Your Description description amp vbCrLf For recordIndex 0 To records Count 1 Application StatusText Scanning table amp CStr recordIndex4 1 amp of amp CStr records Count amp Set record records recordIndex KMLText AddText Placemark amp vbCrLf 171 KMLText AddText vbTab amp lt description gt amp CStr record Data Description amp lt description gt amp vbCrLf KMLText AddText vbTab amp lt name gt amp CStr record Data Name amp name amp vbCrLf AddText vbTab amp lt LookAt gt amp vbCrLf AddText vbtab amp vbtab amp lt longitude gt amp CStr record Data Longitude I amp lt longitude gt amp vbCrLf KMLText AddText vbtab amp vbtab amp lt latitude gt amp CStr record Data Latitude I amp latitude amp vbCrLf ct ct KMLText AddText vbtab amp LookAt amp vbCrLf KMLText AddText vbtab amp TimeStamp amp vbCrLf KMLText AddText vbtab amp vbtab amp when amp CStr record Data WhenYr amp amp CStr record Data Whe KMLText AddTex nM amp amp CStr record Data WhenD amp when amp vbCrLf t vbtab amp TimeStamp amp vbCrLf AddText vbtab amp Point amp vbCrLf o KMLText KMLText AddText vbtab amp vbtab amp lt coordinates gt amp CStr record Data Longitude I
61. MUCH faster than iterating through a loop Zoom to Selected Areas with additional border http 69 17 46 171 Site Thread aspx id 24023 amp ti 63288 1304717330000 Here s a basic example in VBScript that just uses the geometric properties that might help you code the C you want I have changed Mike s original VBscript 1 Uses the currently selected object or objects 2 Checks to make sure that at least one object has been selected 3 Allows you to zoom to the select objects bounding box with an additional margin around the box L Ketch 1 Ok Ck Kk kk I I I I I I I I I I KI I S S S amp S amp M amp M amp M amp M amp M amp M amp KG amp KU KU GGG AM Option Explicit Sub Main Dim Comp Comps Dim Map Objs bBox NewBox Dim n 237 Set Comps Document ComponentSet obtain drawing with area objects you want to select Set Comp Comps Northern Hemisphere obtain map to render from Set Map Comps Map Grab the currently selected object s in Comp Set Objs Comp Selection If Objs Count 1 Then Application Messagebox You have not selected any objects in drawing Comp Name amp Exit Sub End If grab its bounding box Rect property Set bBox Objs GeomSet Box Set NewBox Resize DrawingBox bBox 0 1 0 1 Resize bBox to allow allow additional space around the selected object s render to an image map RenderAreaTo Image 100 100
62. Names Col Index amp Else Str cStr Rcrd Data Column Names Col Index End If If Fixed Width Then Padding String Column Widths Col Index Len Str 32 Padding Space Column Widths Col Index Len Str Str Str amp Padding Report Report amp Str Else If Col Index Last Col Index Then Report Report amp Str Else Report Report amp Str amp Separator End If End If Next Report Comp AddText Report amp VbCrLf Application StatusText cStr Rcrd Index 1 amp of amp cStr Record Count Next Report Comp Open Report Comp Copy Send a copy to the Windows Clipboard End Sub Ck CK Ck ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Sk ck kk Ck Sk Ck ck kk Ck kk kk kk ko ko kx ko Mk ko k ko ko kok ok 234 Search All Scripts for a Specific String http www georeference org Forums tabid 7 1 forumid 4 tpage 1 view topic postid 10586 Default aspx 10586 06 28 2005 10 26 AM 07 14 2005 5 50 PM Sub Main dim app doc comps set app application set doc app activedocument set comps doc componentset sToFind app inputbox Enter string to search for for each comp in comps if comp typename Script then sText comp text lFound InStr 1 sText sToFind 1 if lFound 0 AND not isnull lFound then comp open end if end if next End Sub Set Default Point Size and Style http www georeference org Forums tabid 7 1 forumid 7 tpage 1 view topic postid 124
63. NewGeom but you do not need this detouring here Ww So the code with a dummy point simply reads VBScript Set app Application Set comps app ActiveDocument ComponentSet Set labelcomponent comps Labels Comp Set thePoint app NewPoint 10 10 Set labSet labelcomponent LabelSet labSet add 255 thePoint 189 Set Label Rotation Based upon a Column Value http 69 17 46 171 Site Thread aspx id 5682 amp ti 63234659 1000000000 Here is a small script that will set the rotation to the associated value in a column in other words first set the formatting to unique values and choose the proper column close the dialog then run the script Option Explicit Sub Main Modified for V7 LAK Dim Comps Drwg fVS fValObj Set Set Set For Comps Document Componentset Drwg Comps Drawing fVS Drwg PointRotation Values Each fValObj in fVS fValObj Formatting fValObj Value Next End Sub 190 Layouts http forum manifold net Site Thread aspx id 32835 Applying a Layout Template to Different Layouts pcardoso on 12 29 2006 10 29 AM 32836 I don t know how to solve this I have a number of layouts to do based in a common template created from a model created using a map MAP1 I stored the template as xml In order to reproduce exactly the template into another map MAP2 with a different set of drawings I tried both select from Menu Edit Template Apply
64. Object sized 10 larger in the X direction and 5 larger in the Y direction than the original Lines bounding box i Map Window ZoomTo Win Boundaries Dim X Max X Min Y Max Y Min Dim X Change Y Change Set Resize DrawingBox OldBox The RectOobject s min and max properties return values that are in the drawing s projection X Max Resize DrawingBox XMax X Min Resize DrawingBox XMin Y Max Resize DrawingBox YMax Y Min Resize DrawingBox YMin X Change X Max X Min X Percent 2 Y Change Y Max Y Min Y Percent 2 Resize DrawingBox XMin X Min X Change Resize DrawingBox XMax X Max X Change Resize DrawingBox YMin Y Min Y Change Resize DrawingBox YMax Y Max Y Change End Function 1 kk ck ck ck ck ck C ck Sk Ck Ck ck Ck Ck Ck Ck ck ck Ck ck ck Ck ck kk Sk ck ck ck kk ck ck ck ck kk ck kk ck ko Sk ck Sk Sk ko ko Sk kv kx ko ko kokok Create a ZoomTo Rect Object Sized a Percentage Larger than the Original Drawing Component Rect Private Function Resize DrawingBox ByRef Comp _ ByRef X Percent ByRef Y Percent Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca 239 Dim Dim Lf End Set Receives a Drawing Component and enlarges or reduces the Geoms bounding box by a Percent The function creates a Rect Object that is sized X wider and Y higher than the Line drawing object s original extends You can use the new Rect in the Zo
65. ObjectSet msgbox win CameraDX amp vbcrlf amp win CameraDY amp vbcrlf amp win CameraDZ exit sub 128 iterate over all objects For n 1 To dwgObjs Count Set obj dwgObjs Item n 1 act only on line objects using first two points of first branch If obj Type ObjectLine Then Set ptSet obj Geom BranchSet Item 0 PointSet obtain the two points and calculate camera directions from the bearing from ptl to pt2 S these range from 10 to 10 for all 3 dimensions not totally ure this is right but it seems fine Set ptl ptSet 0 Set pt2 ptSet 1 bearing ptl BearingTo pt2 win CameraDY cos bearing 10 win CameraDX sin bearing 180 10 win CameraDZ dz UC GHEE TE EE TE E IE HE HH EEE AE FE E HE FE E FE EEE EE EE EE EEE EE EE EEE EEE EEE EE EEE HH turn this section off if you have no height data in your drawing obtain the height value from the surface this is mostly so you can make it more than zero if desired win CameraHeight records records ItemByID obj ID Data htColumnName t zOffset vt dd UC d HRS E E aE AE E AE AP aE aE AE aE E FE aE HE AE aE E aE aE aaa aaa aaa create a new point and move the window view to it and refresh Set nPt Application NewPoint nPt X obj Geom Center X nPt Y obj Geom Center Y win MoveToLocation nPt FALSI win Refresh GI waste some time delay waitThisLong exit sub End If Next End Sub a
66. PROPER WAY TO ASSIGN AN OBJECT TO A COMPONENT ADDED BY THE NEW METHOD een 225 ADDING A DLL REFERENCE TO A VBSCRIPT asiosio tire ARS EE SEEE EEEE EES 225 IMPLEMENTING DISSOLVE 5 certe erectos er TUR E HL PES EVE e EYE Dee T E PER es TERR Cotes 226 USE UNION RATHER THEN DISSOLVE IN VB SCRIPT scsessssecececsesssececececeessaeceeececseseausceeceecsesesaeeeeeeseseneneaeees 227 CHANGING DRAWING AREA COLOURS AND THEMES ccccsessssecececsesseeeccecceceenssueceeececeeseaueceeecseseseaeeeeeesesenenssaeees 229 CONVERT TABLE QUERY TO DELIMITED TEXT STORED IN COMMENTS COMPONENT eese eene 230 SEARCH ALL SCRIPTS FOR A SPECIFIC STRING csssessscccececsessnsecceececsensnsececececsensecececsesessseaecececsesenseaeeeceeeecenses 235 SET DEFAULT POINT SIZE AND STYLE vais 6ieeteseecch eco fes detta ee ere kin PRI eL fos E dE Ee ede VOR Pose vec Rte ca de e cele e d egea da 235 QUERY CACHING BE CAREFUL WHEN RERUNNING THE SAME QUERY TEXT VIA CODE eeeeeee 236 CANNOT LINK A QUERY PROGRAMMATICALLY eene ZOOM TO SELECTED AREAS WITH ADDITIONAL BORDER CREATE A ZOOMTO RECT OBJECT SIZED A PERCENTAGE LARGER THAN THE ORIGINAL DRAWING COMPONENT dye p E EA 239 DOES A COMPONENT NAME EXIST IN THE PROJECT sssessessseeeeeeeene enne nenne henetren trennen reete enne 241 DELETE A PROJECT COMPONENT PASS COMPONENT
67. ParmSet Item ScaleX CoordSys ParmSet Item ScaleY Name Datum Name Ellipsoid Name Unit Name Datum ParmSe ParmSe ct ct 21000 required here or the script fails Item localOffsetX Value Item localOffsetY Value Value Value Value Value CoordSys ParmSet Item FalseEasting Value CoordSys ParmSet Item FalseNorthing Value CoordSys ParmSet Item majorAxis Value CoordSys ParmSet Item Eccentricity Value CoordSys ToXML 214 End Sub VK KKK KKKKKKKKKKKKKKKKKKKKKKKKKKK KKK KKK KKK KKKKKKKKKKKKKKKKKKKKKKKK Private Sub Delete Component ComponentName Dim Component Index Dim Components Set Components Application ActiveDocument ComponentSet Component Index Components ItemByName ComponentName If Component Index lt 0 Then Exit Sub Components Remove Component Index End Sub 1 Ck ck ck kk Sk S kk Sk Sk kk kk kk kk S Sk Sk Sk kk S kk kk kk kk kk kk kk kx x kx Checking the WindowSet For a MapComponent Then finding the Active Drawing http www georeference org Forums tabid 71 view topic forumid A postid 544 1 Default aspx also see http www georeference org Forums tabid 7 1 forumid 7 postid 174 view topic Default aspx which is NOT reproduced below 11 16 2004 7 28 PM Sub Main Set windows Application WindowSet If windows Count 0 Then Application Messagebox No active component Exit Sub End If fail if there are no opened wind
68. Sk Mk kx k kv ko ko kockockok Sub InsertTiles ByRef Surfaces ByRef Main Surface y L Ketch Surfaces Dynamic array holding the Surface Component Names MainSurface The Start Tile name Other tiles will be pasted into this one Dim Comp Comps Dim TargetTile Dim Counter Dim TileCounter Dim NumberOfSurfaces Set Comps Document ComponentSet Set TargetTile Comps Main Surface NumberOfSurfaces uBound Surfaces 1 ll p TileCounter For Counter 0 to uBound Surfaces If uCase Main Surface uCase Surfaces Counter Then Set Comp Comps Surfaces Counter Application StatusText Inserting Tile amp TileCounter amp of amp NumberOfSurfaces TileCounter TileCounter 1 Comp Copy FALSE FALSE Copy the entire component ignore any selections TargetTile Paste FALSE FALSE Paste into the main tile but do not replace the selection Delete the component just merged with the main tile Comps Remove Comps Surfaces Counter End If Next End Sub 1 kk ck ck ck ck ck CK ck Sk Ck Ck ck Ck Ck Ck Ck Ck kk ck Scc kk ck KKK KKK kk kk ck ck kk ck kk ck ck ck ck kk ck Sk Sk ko Sk Sk Mk kx k ko ko ko ko kockok Using Regular Expressions Example taken from Plot Cyclone FoestIrack map L Ketch C Documents and SettingsLorne Limited My Documents WManifoldMTropical Cyclone 256 Option Explicit VK KKK ck ck KKK KKK KKK KKK KKK KKK KKK
69. Sub Import Release45 Network File Imports file produced by Release 4 5 Write Network solver to a new drawing Sub Main Pi 3 1415926535897932 Radius 10 CenterX 10 Centery 15 ask for filename FileName InputBox File name Input Set fso CreateObject Scripting FileSystemObject If fso FileExists FileName Then open file Set Stream fso OpenTextFile FileName 1 True PtsCount CInt Stream ReadLine LineCount CInt Stream ReadLine create new drawing Set Drawing Application ActiveDocument NewDrawing Release45 Network Set Pts Application NewPointSet Set Brs Application NewBranchSet Pts Add Application NewPoint Brs Add Pts add point object for each network node For i 0 to PtsCount 1 X CenterX Radius sin 2 Pi PtsCount i Y CenterY Radius cos 2 Pi PtsCount i Brs 0 PointSet 0 X X Brs 0 PointSet 0 Y Y Drawing ObjectSet Add Application NewGeom GeomPoint Brs 51 Next Set BrsLn Application NewBranchSet Pts Add Application NewPoint BrsLn Add Pts add line object for each network edge For i 1 to LineCount TextLine Stream ReadLin Tokens Split TextLine 2 FirstPt CInt Tokens 0 SecondPt CInt Tokens 1 X CenterX Radius sin 2 Pi PtsCount FirstPt 1 Y CenterY Radius cos 2 Pi PtsCount FirstPt 1 BrsLn 0 PointSet 0 X X BrsLn 0 PointSet 0 Y Y sin 2 Pi Pt
70. Sub Convert GeomTable2Drawing _ Dim Dim Dim Dim Dim Dim Set ByRef SourceGeom TableName ByRef Geom ColumnName ByRef NewDrawing Name Author Lorne Ketch Email iKetch at hfx 1st dot eastlink 2nd dot ca V1 0 Nov 29 2006 V1 1 Jan 12 2007 Added Functions Extract CoordSys From Geom Table Column Exists Comps Qry Source Tbl Source Col Source Cols New Drawing New Table New ColumnSet New Column Column List Index Last Index Coord Sys Comps Document Componentset 312 Make sure the Query component exists If Comps ItemByName Query lt 0 Then Else Set Ory Document NewQuery Query Set Ory Comps Item Query End If If NOT Table Column Exists SourceGeom TableName Geom ColumnName ColumnTypeGeom Then Exit Sub Se Se Se Cr cr CT Set Se Se Se ERCE LES Last Source Tbl Source Cols Source Col Source Cols Geom ColumnName Comps Item SourceGeom TableName Source Tbl ColumnSet Extract the Coordinate system from the Geom column of Record 1 Coord Sys Extract CoordSys From Geom SourceGeom TableName Geom ColumnName New Drawing Document NewDrawing NewDrawing Name Coord Sys FALSE New Table New Drawing OwnedTable New ColumnSet New Table ColumnSet Index Source Cols Count 1 Column List On Error Resume Next For Index 0 to Last Index Set Source Col Source Cols Index If NOT
71. Sub to cancel all selections in various component types that would often show up in Map Components This could be made specific to a given map window with a little extra code Set Comps Document ComponentSet For Each Comp in Comps Comp Type Comp Type rn If Comp Type Comp Type Comp Type Comp Type Comp Type Comp Type i n n ComponentDrawing OR ComponentTable OR _ ComponentImage OR _ ComponentLabels OR _ ComponentSurface OR _ ComponentTerrain Then Comp SelectNone End If Nex 252 End Sub VK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK kv Mk ko ko kock ko kock Import Components from Other Projects Option Explict Sub Main Dim Comps Comp Dim Project Path External Doc Author Lorne Ketch 1p Email Ketch at Jhfx dot eastlink ca Project Path C Documents and Settings Lorne Limited My Documents Manifold TrackLines Tracklines map Set External Doc Application NewDocument Project Path TRUE TRUE above Read only Set Comps External Doc ComponentSet Set Comp Comps Drawing Comp Copy False Copy Everything Document Paste Paste to the current Document End Sub VK KKK KK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK Mk k ko ko ck ko kock Merge GeoBase DEM Tiles NOTE Uses Michael Sumner s code in the primary conversion function ht
72. System unit scale amp vbCrLf End With End Select ComponentReport s End Function 1 Ok Ck Kk KU KU KK C KK I S I S S S S S S I S amp S amp S amp I M amp amp M amp M M amp M amp M KG amp KU GI IAM Function HHMM Time ByVal dt Dim s If IsDate dt Then s Right 0 amp Hour dt 2 S s amp Right 0 amp Minute dt 2 Else S Not a date End If HHMM Time s End Function Function YYYYMMDD Date ByVal dt Dim s If IsDate dt Then S Year dt S s amp Right 0 amp Month dt 2 S S amp Right 0 amp Day dt 2 Else s Not a date End If YYYYMMDD Date s End Function Export Surface Pixels Greater than 0 to XYZ Text File FileSystemObject http 69 17 46 171 Site Thread aspx 1d 20283 amp ti 632814571483770000 Does anyone have a script snippet that would allow me to export to xyz any surface pixels greater than 0 I could do this interactively but I am interested in learning to script selection and manipulation of pixelsets Thanks Something to get you going VBScript Sub Main Set surface Application ActiveDocument ComponentSet Surface create file and export each pixel whose height is greater than 0 Set fs CreateObject Scripting FileSystemObject Set stream fs CreateTextFile C Documents 1l xyz true 165 For Each pixel In surface PixelSet If pixel Value gt 0 Then stream WriteLine pixel X amp amp pi
73. THE ROOT OF THE WSH OBJECT MODEL WSCRIPT cc cceceeeeeseeeseeeeeeeeeseenaeenaes 263 CASTING GEOM I BINARY COLUMN DATA NOT EQUAL A GEOM OBJECT isses 264 NEWIMPORT PROBLEMS EXTERNAL DATABASE CONNECTION FAILS eese nen nennen een enne 265 EXPORT A PALETTE USING A SCRIPT ccscssscccccecsessnsecececcesenssceecececsenesaaeceeececcessaaecescceceeseauececeesesesseeceeeeecseneneaeees 265 PRESET DEFININTIONS COMMAND FILTER LIST ssscsssscssssssssscccscssssscneccccssssscssececesesssscssenscesseces 267 PRESET DEFININTIONS DISTANCE AND AREA UNITS ccccccssssssssssscccsscsccseccescsssscssecesescssssessesssesseses 276 PRESET DEFINITIONS STYLE LISTS SYSTEM DEPENDANT ecce ee eee eerte een netto seen netta seen seen 278 TABLE V7 AREA STYLBS AUG 12 2006 cedat eee ede te e dedere e e tee Riera 278 TABLE V7 LINE STYLES AUG 12 2006 cse tue ie pe eee e e dee reed aede eed ova 278 TABLE V7 POINTSTYLES AUG 12 2006 ccce e ie rr pe eee e ede reed aei aede doa 279 TABLE LABEL STYLES AUG 12 20006 eese sae ie e tede dee re e e d edere 282 OBJECT MODEL V7 FEATURES AND CHANGES eerte esee enne eee tn oeste tn sesto sese ee to asse sense etta ae eee eo ae eS 283 DESELECT RECORDS NEW V7 SELECTNONE SELECTALL amp SELECTINVERSE METHODS eene 283 DOCUMENT IS A PREDEFINED KEYWORD ACTIVEDOCUMENT OFTEN NOT REQUIRED
74. TypeName Case Map Case Drawing amp comp Description amp vbCrLf Debug Print Zoom amp comp ZoomMin amp amp comp ZoomMax amp vbCrLf Debug Print Precision amp comp Epsilon amp vbCrLf Case Else Debug Print Zoom amp comp ZoomMin amp amp comp ZoomMax amp vbCrLf End Select Set system comp CoordinateSystem Debug Print Coordinate System amp system Preset amp vbCrLf Debug Print Datum amp system Datum Name amp vbCrLf Set params comp CoordinateSystem Parameters For I 0 To params Count 1 With params I Select Case Name supress select params print others Case majorAxis eccentricity centerX centerY centerZ ignore these cause I don t have a clue as to what they do Case scaleX localScaleX scaleY localScaleY falseEasting localOffsetX falseNorthing localOffsetY com com com com com com com CoordinateSystem Parameters ItemByN CoordinateSystem Parameters ItemByN XY CoordinateSystem Parameters ItemByN CoordinateSystem Parameters ItemByN CoordinateSystem Parameters ItemByN CoordinateSystem CoordinateSystem these are handled wit Case Else unaccounted fo Debug Print amp Name End Select End With Next With comp CoordinateSystem Param Debug Print Local Offset X Debug Print amp Debug Print Local Scale Debug Print amp
75. Value Rcrd Data localOffsetY CoordSys ParmSet Item localOffsetY Value Rcrd Data localScalex CoordSys ParmSet Item localScaleX Value Rcrd Data localScaleY CoordSys ParmSet Item localScaleY Value Rcrd Data ScaleCorrectionX CoordSys ParmSet Item ScaleX Value Rcrd Data ScaleCorrectionY CoordSys ParmSet Item ScaleY Value Rcrd Data FalseEasting CoordSys ParmSet Item FalseEasting Value Rcrd Data FalseNorthing CoordSys ParmSet Item FalseNorthing Value Rcrd Data majorAxis CoordSys ParmSet Item majorAxis Value Rcrd Data Eccentricity CoordSys ParmSet Item Eccentricity Value Rcrd Data CoordSys XML Coord Sys ToXML Next CoordSys Table Open End Sub VK KK ck CK kk C Ck Sk C Ck CK Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck CK Ck Sk CK Ck Ck CK Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Sk Ck Sk Ck Sk Sk Sk Kk kv KK ko kv Mk k ko ko ko ko kocko 125 126 Images Surfaces and Terrains Terrain Fly Through http 69 17 46 171 Site Thread aspx id 6062 amp ti 632507946600000000 mdsumner on 11 1 2004 3 05 AM 6063 Hello this is a bit of fun that is now possible with 6 00 SP1 This script will take a terrain that you have in Manifold and fly you along based on a drawing of line segments the smoothness of your ride is basically dependent upon how you construct the lines the script takes each line segment moves to its center point and aligns the camera angle to be looking in the direction t
76. XML that is exactly correct A useful test before launching Manifold is to open any newly created or modified xml file in Internet Explorer Internet Explorer will show a correct xml file in a simple text format If Internet Explorer cannot parse the xml file Manifold won t be able to either Add in forms implemented as NET controls can subscribe to events fired by the Manifold core at runtime To do this include a reference to Manifold Interop dll and Manifold Interop Scripts dll implement the IEventsConnection interface from the latter dll and add handlers to the desired events in the ConnectEvents method of the interface Add In Pane Example URL s Copy all formats Tool http forum manifold net Site Thread aspx id 25027 Convert Track Points to Track Lines http forum manifold net Site Thread aspx id 29956 Column Name Add in http forum manifold net Site Thread aspx id 33488 Manifold COM Object Model Description and NET Usage theory http 69 17 46 171 Site Thread aspx id 26683 amp ti 632927748277800000 adamw at 9 2 2006 6 20 AM 26877 The Manifold Object Model is a COM object model and NET applications use it through an interop assembly named Manifold Interop dll The interop assembly is generated from the COM 81 type library in Ext dll by a standard tool in the NET Framework SDK The tool inspects the contents of the type library and generates NET wrappers for the COM entities it finds COM entities do
77. and http lists directionsmag com discussion search php f 29 From adamw a manifold net To manifold l g lists directionsmag com Sent Wed 06 28 2006 1 21 AM Subject RE Manifold l Verifying the Projection of a large number of Layers gt When I import a CAD drawing DWG file to Manifold 7 there may be 40 to 50 layers In Manifold I have to verify the gt projection of each layer separately even though all projections are 7 the same eg Orthographic in Feet very tedious Is there a better gt way of doing this You can set the CoordinateSystemVerified property of the imported components using a script eg the following will only process drawings you will probably want to extend this to process labels and also to report the names of the altered components Sub Main For Each c In Document ComponentSet If c Type ComponentDrawing Then c CoordinateSystemVerified Tru End If Next End Sub Of course you should only use this script when you are absolutely sure that the coordinate systems of the components are OK Adam Wachowski 118 Batch Reproject Drawings http 69 17 46 171 Site Thread aspx id 18933 amp ti 632754043299370000 grmapper at 2 13 2006 5 12 AM 18960 Thanks I updated the script to this working version based on the freestuff example One thing this seems to take a long time I have about 80 contour maps with millions of points Since the reproject occurs on individual p
78. and choose the template from MAP and Edit Template Apply file loading the xml file By doing this to MAP2 the reference changes to MAPI Well this is not interesting Is this supposed to work like this Is there any way to keep everything from a template but DO NOT change the MAP reference mdsumner on 1 1 2007 3 57 AM 32863 There s no way to provide a generic reference to a component it needs an explicit named component in the template text Just change the text in the XML to the map name you want and it will work this would be pretty easy to semi automate if it matters that much I can t see an easy way that you could reference a component without the explicit name it generates too many possibilities How to choose which map Automate Layout Creation http 69 17 46 171 Site Thread aspx id 19428 amp ti 632773629605470000 eandelin at 3 6 2006 8 23 PM 19429 I have a project that will involve extracting and adding multiple layers such as roads schools commercial businesses and labels to 900 sq mi area The final maps will then be cut according to a pre determined grid into individual tiles and exported for printing If I create the map with all the labelling and layers then place a grid on it is there a way to automate the layout creation as opposed to doing a clip with intersect on each individual tile seatrails at 3 7 2006 7 32 PM 19472 We create a lot of irregular grids for our maps that need to be re
79. and disappear rather it throws an error on subsequent lines past where I expected it to have exited the loop If mProgress Update False Then Exit For End If Thanks for the help N I just tried this code and it seems to halt OK both messages are shown when you cancel VB NET Imports Manifold Interop Scripts Imports Manifold Interop Imports System Threading Class Script Shared Sub Main Dim progress As Progress Context Application NewProgress progress MaxPosition 100 progress Text Lengthy operation progress Start Do While progress Position lt progress MaxPosition progress Position progress Position 1 progress Text Lengthy operation amp progress Position amp done If Not progress Update Then Context Application MessageBox Canceled Script Exit Do End If Thread Sleep 100 Loop progress Stop Context Application MessageBox After the loop Script End Sub End Class 98 Programming an Add in Toolbar DLL in VB NET http 69 17 46 171 Site Thread aspx id 26739 amp ti 6329277498 18570000 You can create an add in pane with a menu and have menu items launching other forms modal or modeless You cannot create a visual tool like say Select Box or intercept the output of the existing visual tool You can however create your own application with an instance of the Manifold ActiveX control and create your own visual tools that would operate in
80. application puh With the ManifoldViewer application I could read a map file and I could select polygons in that map file 86 BUT I am not able to zoom in is that intended behaviour of the application I would really appreciate if you could look into this one also Regards Trond FOLLOWUP NOTE L Ketch There also seems to be a problem with code that should now reside in FormMain Designer vb being originally included in FromMain vb There are double instances of constants and subroutines that have to be deleted I deleted and moved some of the problem code There is now a working VB net 2005 version stored at C Documents and Settings Lorne_Limited My Documents Manifold ActiveX_Example ManifoldViewer Note that the DemoMap example has also been converted and resides at C Documents and Settings Lorne_Limited My Documents Manifold ActiveX_Example DemoMap 7x COM Registry problem http forum manifold net Site Thread aspx id 3 1598 cwarner on 12 6 2006 3 12 PM 31599 example dimensioning of various Manifold objects Dim manApp As Manifold Application Dim manDoc As Manifold Document Dim manComps As Manifold ComponentSet manApp CreateObject Manifold Application Using New Manifold Application above has same behaviour manDoc manApp ActiveDocument manComps manDoc ComponentSet Dim proc As MyLibrary Modulel New MyLibrary Modulel proc Components manComps proc DoStuff This always hangs u
81. bbox true optionally update the map window Map Open make sure it s the active window Application WindowSet ActiveWindow ZoomTo NewBox End Sub 1 Ckok ck ck ck kk Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck Ck Ck ck Sk Ck kk Ck ck Sk Sk kk ko Sk ko k ko Mk kx ko ko ko ko ko ko Private Function Resize DrawingBox _ ByRef OldBox _ ByRef X Percent ByRef Y Percent Receives a Rect Object and enlarges or reduces it by the given percentages The function creates a Rect Object that is sized X wider and Y higher than the Original Rect You can use the new Rect in the ZoomTo Rect MapWindow Method to add some white space around the original box Just personal opinion but I think the maps look better zoomed out a bit NOTE In many cases the Y extend does not seem to affect how Manifold actually zooms a MapWindow X dominates while the changed Y sometimes seems to be ignored in the final map widow display This seems related to where the geographic objects actually reside on the final map but I don t have a good handle on this yet 238 fo One could use a single change for both width and height and often end result would i be similar Example Useage We want to ZoomTo Component Lines but allow a buffer around the original Lines rectangle Set Win Boundaries Resize DrawingBox Lines ObjectSet GeomSet Box 0 10 0 05 Win Boundaries is now a Rect
82. calculation Anybody out there know if Manifold can calculate hillshades from a DEM The word hillshade is not even in the help file so I m looking for any help finding the right formula Here is one method C sunHorizontal Deg2Rad 0 sunVertical Deg2Rad 45 say 45 degrees up Earth shade cos sunVertical slope ComputeSlope surface x y returns radians If slope 0 aspect ComputeAspect surface x y returns radians shade cos sunVertical cos slope sin sunVertical sin slope cos sunHorizontal aspect if shade lt 0 shade 0 applying shade intensity z minZ maxZ minZ shade 0 1 Is not hillshading let s call it shadowing just the the inverse of the amount of insolation a slope will recieve for a given solar incidence radince angle and azimouth See the morphometric variables thread On the website of Peter Sharry linked to therein one of the morphometric variables described is surface insolation a contraction of incoming solar radiation http www giseco info pb wp_d4052550 wp_d4052550 html 0 5172811002358266 145 Import Export Import Surfaces Set Surface Projections then Merge to One Surface IMPORTANT NOTE FROM KlausDE on GeoReference May 18 2006 6 5 gt 7 0 new CoordinateParameterSet KlausDE at 5 18 2006 5 33 AM 21328 With Manifold 7 0 the structure of the CoordinateSystemParameterSet has changed The Index of Pa
83. clueless about programming with Visual Basic or any other language for that matter There is a Unit object that is part of the CoordinateSystem object Try experimenting with that Problem is that I have no idea gt how lt to experiment with it I suppose when I have more time I could and will sometime in the future spend two or three weeks or more reading and studying to gain a rudimentary knowledge of all the concepts syntax etc of VB programming but for now was sort of looking for some ready made code that I could cut and paste into the script I was hoping that someone who already has all that programming knowledge and expertise could whip out the code in a few minutes and post it I can usually take a generic script and figure out how to customize it a little for my particular needs but adding specific code like this is something currently beyond my comprehension 152 Justin Import External Images Using Drawing Index http forum manifold net Site Thread aspx id 1967 amp ti 63300508 1137170000 mdsumner on 11 29 2006 2 29 PM 1968 Hello here is a script with map data for example purposes for using scripts to import external image files based on a drawing index It s in response to this thread on Manifold L http lists directionsmag com discussion read php f 29 amp i 35753 amp loc 0 amp t 35753 You need to have some external images for it to work I have supplied some with instruction in the map file
84. cmp Type ComponentFolder Then For Each child In cmp Children DoMerge child Next End If End Sub Sub Main DoMerge Application ActiveDocument Componentset folderName End Sub script 7 updated the script to this working version based on the freestuff gt example One thing this seems to take a long time I have about 80 7 contour maps with millions of points Since the reproject occurs on gt individual points within the drawings it requires significantly more gt processing time than simply doing it by hand gt gt Could this be done at a higher level than the Drawing ObjectSet Not yet This is in the wishlist for future editions Adam Wachowski Build Coordinate System Object from WKT String http 69 17 46 171 Site Thread aspx id 28 108 amp ti 632947930186770000 mdsumner on 9 25 2006 2 56 PM 28109 Sub Main Set comps Document ComponentSet Set cs App ication NewCoordinateSystemFromTextWKT PROJCS unnamed GEOGCS GCS WGS 1984 DAT UM D WGS 1984 SPHEROID WGS 1984 6378137 000000 298 257224 PRIMEM Greenwich 120 0 0 UNIT Degree 0 0174532925199433 PROJECTION Orthographic PARAMETER Fa se Easting 0 0 PARAMETER Fa se Northing 0 0 PARAMETER ongitude Of Center 0 0 PARAMETER atitude Of Center 0 0 UNIT Meter 1 0 End Sub Convert a Point from Drawing C
85. correct component Index although it generally does In a GeoReference thread from June 9 2006 adamw at 6 9 2006 7 53 AM 22465 Adam provided a general outline for solving this problem One of the possible ways to locate the components created by the paste operation which can create several components is to save the IDs of all existing components prior to doing the paste and locate the new components after the paste see http 69 17 46 171 Site Thread aspx id 223396 amp ti1 2632854363953230000 This Function attempts to implement that solution Do NOT use coding such as Document PasteAs ComponentDrawing Set NewDrawing Comps Item Comps Count 2 USE this instead New Index Document PasteAs ComponentDrawing If New Index FALSE Then 242 i Application Messagebox Paste failed T Exit Sub End If Set NewDrawing Comps Item New Index Dim Comp Comps Dim Index New ID Dim IDs BeforePaste Dim Count BeforePaste Count AfterPaste Document PasteAs FALSE Set Comps Document ComponentSet Count BeforePaste Comps Count ReDim IDs BeforePaste Count BeforePaste 1 Index 0 For Each Comp in Comps IDs BeforePaste Index Comp ID Index Index 1 Next Do some error checking just in case the Paste fails Err Clear On Error Resume Next Document PasteAs ComponentType Constant If Err Then Err Clear Exit Function End If On Error GoTo 0 Count A
86. ee deed HE eve ee ae PAYER RENEA Eh 191 CUSTOM EAYOUT TEMPLATES 5 ceres eric aee eee eot e eet esee aeter A aedes dove Ee EE ea e ER EE EXER TER 194 LINE INTERSECTS LINE AT COORDINATES ccccsesssceeececeesensccueececeeseaseceecceceeeaueceesescseeaaecececeeseseaeeeeeeeccesensaaeees 195 ENDENE INTERSECT COORDINATES 5 ertt rette AR Tree rn TU bemenece see Eae ee seer die Pee SEDE eee vuota bes 195 PLOTTING POINTS EQUIDISTANT ALONG A LINE SCRIPT sees nenne ethernet entree enne trennen 199 ZDDrOGCh T i usciti Mete eee o Me e be dte Ue lake ute eeek a te pepe ceo oe tpe loe Me ee Rede eta 199 ADprodch 2 7 322 in Hte d Melee ah ge bL pde Pure epar Me ut edet e Roo on be geo 202 FIND COORDINATES OF INFLECTION POINTS ALONG A LINE cesses eee nnne enne etnia enne trennen 203 CREATING TRACK WITH DIFFERENT POINT FORMAT FOR START AND END INTERESTING CODE FOR MAKING LINES Ie p EN 204 MAP COMPONENTES e suoeso v6 oo et ee seo ne FH Gee e naro V Ya GU NEUE Vo oo Fe VE ERN ER RN Ea Ugo e au one Ve eue eon enero ee osses EECa iesti soo DEEDE reS 208 FIND A MAP WINDOW EXTENTS CENTER AND SCALE ccscsssssseeeceesesnsseceeceeceesnsuececececsesesaeceeececceseaeeeeeesesenennsaeees 208 SELECT TOUCH ALL OBJECTS IN ALL MAP LAYERS THAT TOUCH A BOUNDING OBJECT eee 208 THEMATICALLY MAPPING PRECIPITATION AMOUNTS USING POINT THEMES ee
87. folderName Screenshots renderName component Name amp amp x amp x amp y amp amp Date amp amp Time render context component to image Call component RenderTo renderName x y True locate rendered image and move it into a folder named Screenshots renderIndex document ComponentSet ItemByName renderName If renderIndex gt 0 Then Set render document ComponentSet Item renderIndex If render Type ComponentImage Then folderIndex document ComponentSet ItemByName folderName If folderIndex lt 0 Then Set folder document NewFolder folderName Else Set folder document ComponentSet Item folderIndex End If If folder Type ComponentFolder Then render Folder folder End If End If End If End Sub Ck CK Ck KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko ko ko ko ko Sub Main Call Screenshot 400 300 End Sub 61 Ck CK Ck KKK KK KKK Ck Ck KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KK KKK KKK Mk kv ko k kx ko ko ko 62 Active Columns Active Columns Cannot be Added Programmatically Work Around http 69 17 46 171 Site Thread aspx 1d 27504 amp t1 632939834854070000 Hi All Having pored through the documentation and this forum would I be right in stating that we cannot add an Active Column programmatically Jonathan Yes There is no way to add an active column using a script A common workaround is to keep a dumm
88. function to waste the specified number of seconds Function delay wait Delay redirect for two seconds 129 Dim StartTime EndTime WaitTime Get Start Time StartTime Timer Get End Time EndTime Timer Determine how long it took WaitTime EndTime StartTime Continue checking th lapsed time until it reaches wait seconds do while WaitTime wait Get End Time EndTime Timer Determine how long it took WaitTime EndTime StartTime loop End Function Mikes code with Option Explicit added and minor other changes http forum manifold net Site Thread aspx id 3 1217 amp ti 633004906914170000 Option Explicit Author Michael Sumner Date November 1 2004 Version 1 0 0 mdsumner utas edu au Platform Windows XP 2002 SP2 Manifold 6 0 SP1 Language VBScript Manifold System Permission to use modify and distribute this code is hereby granted providing this entire comment section is included No warranty is expressed or implied tH HHH EH EE EE EE EE HE EE EE AE E EE EE EE EE EE EE HEH EE HE EE EE EE EE EE EE EE EE EE EEF OSS SSS SSS SSO OSS SS SSS SS SSSSSSSSSSSSSSSSSSSSSSSSSSSsssssssssssss SS SS THIS IS MIKE S GREAT CODE WITH A FEW UPDATES FOR V7 I END One we OANA ane ak Sai SS S Option Explicit Added SS V7 properties and methods Examples SS
89. gt lt path gt Screenshots ScreenshotLarge txt lt path gt lt status gt Takes a large screenshot of currently opened component lt status gt lt command gt lt addin gt xml Ck CK Ck ck Ck Ck CK Ck Ck Ck Ck Ck Ck Ck Ck Ck ck Ck Ck Sk Ck Ck Ck Ck Ck ck kk Ck Sk Ck ck Sk Ck kk Ck ck kk Ck kk ko Sk E Sk kx ko kv ko ko ko ko ko ko Sub Screenshot x y OT S on obtain context component and ensure it is drawing image labels map or surface Set windowSet Application WindowSet If windowSet Count lt 0 Then Application MessageBox No opened windows Exit Sub End If Set window windowSet ActiveWindow Set component window Component If component Type lt gt ComponentDrawing And _ component Type lt gt ComponentImage And _ component Type lt gt ComponentLabels And _ component Type lt gt ComponentMap And component Type lt gt ComponentSurface Then Application MessageBox Active window should contain drawing image labels map surface Exit Sub End If render context component to image and place image into a folder named creenshots Set document Application ActiveDocument If document ReadOnly Then Application MessageBox Can t create new image component Document is read Ly 58 Exit Sub End If folderName Screenshots renderName component Name amp amp x amp x amp y amp amp Date amp amp Time render context c
90. in the layers pane don t reflect my changes Any ideas how to do that Joe You should have some code in there that looks similar to the following I have added in a few extra lines using the if statement to turn the check boxes off on specific layers code jscript if layerList layerItem if region amp amp command startup status hotstart amp amp layerList layerItem Cadastral Parcels layerList layerItem Contours layerChck parameter layer layerSqno off jelse layerChck parameter layer layerSqno layerDefv if layerChck layerChck checked 177 layersC layersC lt tr gt lt td class panetext gt lt input id layer layerSqno name layer layerSqno V layerChck type checkbox gt encode layerList layerItem lt td gt lt tr gt n code Cheers James beautious thanks In case anyone is interested the code 1 have working is here is in between the backslash lines the rest was standard output from the ASP template i can easily add more layers to the list code jscript for layerItem in layerList MIL B MMMMMMIIPIP oil II P P PPM IMP Mllllllllllll I I P P P P MP PP PI TTT if layerList layerItem if command startup amp amp layerList layerItem Cities layerList layerItem Highways layerChck parameter layer layerSqno off
91. is my code Sub Main create temporary query component Set document Application ActiveDocument Set components document ComponentSet set columns Application NewColumnSet set column columns NewColumn column Name col 1 column Type ColumnTypeWText columns Add column Set dibujo document NewDrawing dibujo Se Se drawingA components components ItemByName MFE3 drawingB components components ItemByName Dibujo ct ct Set objectsB drawingB ObjectSet se Se recordsA drawingA OwnedTable RecordSet recordsB drawingB OwnedTable RecordSet ct ct For index 0 To drawingA ObjectSet Count 1 Set object drawingA ObjectSet index Set recordA recordsA recordsA ItemByID object ID Set recordB recordsB recordsB ItemByID objectsB LastAdded ID if recordA Data SP1 45 or recordA Data SP2 45 or recordA Data 45 then objectsB Add object Geom recordB Data Name recordA Data Name end if Next query Text Select FROM MFE3 WHERE SP1 21 OR SP2 21 OR SP3 Set table query Table 299 Sp3 alen End Sub Rodrigo at 12 28 2005 3 33 AM 17412 Solution set cols Application NewColumnSet set col cols NewColumn col Name TPM col Type ColumnTypeWText cols Add col Set dibujo document NewDrawing dibujo Set tabladibujo components Item Dibujo Table Set columnsdibujo
92. jelse VMIMLL Mg MIENNE B MHIL T T T P C MP Mb b P P P PL P PG MPMPPPPPPTMMP PP IMP PPM MM P M MP P M MM Pg MIEIME layerChck parameter layer layerSqno layerDefv if layerChck layerChck checked layersC layersC lt tr gt lt td class panetext gt lt input id layer layerSqno V name layer layerSqno NV layerChck type checkbox gt _ encode layerList layerItem lt td gt lt tr gt n layerSqnott if layersC layersC n lt table gt n layersC lt tr gt lt td gt lt input type hidden id count name count value layerSqno gt lt td gt lt tr gt n lt tr gt lt td gt lt input type button class panetext value Apply onclick invokePane layers gt lt td gt lt tr gt n lt table gt n code 178 Published Layers http 69 17 46 171 Site Thread aspx id 10545 amp ti 632496579000000000 Hi there I have a simple question In my published project i have 5 layers I need to have 3 of them permanently on while the 2 layers left can be switched on off by the users 3 always on the user can t switch them off In fact I don t even want them to appear on the layer list 2 that can be switched on off Can anyone help me Thanks in advance AndrT Coutinho PS i tried to use lt input type hidden but that conceals the layers and 1 want to see them but not allow the user to sw
93. layerDefv if layerChck layer21 off turnOffAerials y if layerChck layer21 on turnOffAerials n I then pass the n or y to the html and on reload use the mapserver TurnLayer which works to turn off the desired layers based on what the turnOffAerials variable says What am I doing wrong From the layerChck declaration I think I have the set the variable values correctly adamw at 7 10 2006 7 24 AM 24079 The code should probably be JScript if layerList layerItem layerChck parameter layer layerSqno layerDefv if layerChck layerChck checked if layerSqno 21 turnOffAerials layerChck checked 175 How to have Some Layers Unchecked when a Webpage is Loaded http 69 17 46 171 Site Thread aspx id 22635 amp ti 632862969446400000 Hi all I know it has something to do with layerChck parameter layer layerInd layerDefv if layerChck layerChck checked but when the webpage is generated it just checks to see whether the layer is present in the project and not whether the layer is visible not visible As a result it always displays all the layers as checked visible by default Any ideas Cheers T I fumbled around with the same thing and finally got it working by hard coding the layer names into the code like this if layerList layerItem if command startup amp amp layer
94. mDrawing Document NewLabels Road Labels mDrawing mLabel Text theRoadField For i 0 To mDrawing ObjectSet Count 1 mLabel LabelSet Add mDrawing ObjectSet i _ mDrawing ObjectSet i Geom Next I get the following error Cannot add label The label object is created linked to the drawing When I open the label window i see a point but no text If I Unlink the label from the drawing and then open the label window the text appears Does anyone know what I am doing wrong here I have also tried omitting the second argument in the LabelSet Add line without any luck I have been able to reproduce this This is a bug which will be fixed Creating Bound Labels http 69 17 46 171 Site Thread aspx 1d 18608 amp ti 632762469194000000 For bound Labels use LSet Add Object Geom bind the labels to a table column Labels Text LabelColumn For each object In theDrawing ObjectSet Labels LabelSet Add object object Geom Next NOTE SEE ADAM S LAST COMMENT IN THE NEXT TOPIC Bound Labels Created by Script do Not Display 185 You can bypass the manual adding of each layer by setting the Synchronized property to False and then back to True In the code above forget the For loop and just use two lines Labels Synchronized False Labels Synchronized True AND V7 supports a new extentions to the Document Object NewLabels String name Drawing drawing Boolean exactName Boolean popula
95. particular drawing will accept values in any projection but reading from the field will always return values in the projection of the drawing You can have a table with a Geom field or a query that returns a Geom field and have EACH VALUE IN THAT FIELD BE IN A DIFFERENT PROJECTION THOUGH Dim Comps Qry Tbl Rcrds Set Comps Document ComponentSet Make sure the Query component exists If Comps ItemByName Query lt 0 Then Set Ory Document NewQuery Query Else Set Ory Comps Item Query End If Ory Text Select Top 1 cCoordSys amp Geom ColumnName amp as CS FROM amp SourceGeom TableName amp Ory RunEX TRUE Set Tbl Qry Table Set Rcrds Tbl RecordSet Cr CT Set Extract CoordSys From Geom _ Application NewCoordinateSystemFromBinary Rcrds 0 Data CS End Function Ck CK Ck Ck Ck Ck CC Ck Ck Ck KC Ck Ck Ck Ck CK Ck Ck C Ck Ck Ck Ck Ck Ck Ck Ck ck kk Ck kk Ck ck kk Ck kk Ck ck kk kk Sk Sk Sk Sk Kk kx Mk Sk ko ko ko ko ko ko Private Function Table Column Exists _ ByVal Table Name _ ByVal Column Name ByVal Column Type Author Lorne Ketch Email Ketch at hfx 1lst_ dot eastlink 2nd dot ca Column Type is a ColumnType enumeration 314 ColumnTypeAChar ColumnTypeGeom ColumnTypeInt8U ColumnTypeAText ColumnTypeGeomSHP ColumnTypeLatitude ColumnTypeB
96. remind everyone to state explicitly what version of Manifold you re using And since these new methods aren t in the documentation if you don t have access to or prefer not to use VS for object model browsing then check out the wonderful NET Reflector http www aisto com roeder dotnet Document is a Predefined Keyword ActiveDocument Often not Required http 69 17 46 171 Site Thread aspx 1d 21589 amp ti 632840185176300000 Why is it that when in Manifold 7 when i Set document Application ActiveDocument 283 I get an error Object doesn t support this method or property document but in manifold 6 5 it works perfectly find If i change the variable document to something else like doc it works find but if I don t change it i have to declare the variable document first then only it works Can anyone please explain Thanks adamw at 5 23 2006 10 01 PM 21596 When Manifold starts a script written in a non NET language such as VBScript JScript or say Python meaning ActiveState Python it creates a set of predefined objects which the script can use to access the current execution context Thus 7 00 6 50 and all other versions of Manifold are creating the Application object which is what you use when you do VBScript Set doc Application ActiveDocument 7 00 is also creating the Document object The Document object points to the active document if you are running an interactive session of Manifold and to
97. s s amp name amp amp vbTab amp value amp vbCrLf End Select End With Next report standard parameters With Component CoordinateSystem parameters s s amp Local Offset X Y amp Component CoordinateSystem Parameters ItemByName localOffsetX value amp vbcrlf S mugRe Ue ow Component CoordinateSystem Parameters ItemByName localOffsetY value amp vbCrLf s s amp Local Scale X Y amp Component CoordinateSystem Parameters ItemByName localScaleX value amp vbcrlf s s amp amp Component CoordinateSystem Parameters ItemByName localScaleY value amp vbCrLf s s amp Scale X Y Ix amp Component CoordinateSystem Parameters ItemByName scaleX value amp vbcrlf S mE Ce ctos Component CoordinateSystem Parameters ItemByName scaleY value amp vbCrLf s s amp False Easting Northing amp Component CoordinateSystem Parameters ItemByName falseEasting value amp vbcrlf s s amp amp Component CoordinateSystem Parameters ItemByName falseNorthing value amp vbCrLf name nick name nick name area s s amp Units amp System unit name amp amp System unit nickname amp System unit nicknamearea amp vbCrLf Lat lon vs Linear T F Scale multiplier to meters or to degrees 164 s s amp Lat Lon I amp System unit islatlon amp Scale to m deg I 2 amp
98. script Use Union Rather then Dissolve in VB Script http 69 17 46 171 Site Thread aspx 1d 20164 amp ti 632804672072100000 e There is no Script Dissolve but you can use Union e Dissolve is basically the same as a Union based on a specific table Is there any way call functions such as Dissolve in a VB Script or will I need to create my own Darryl See this thread on the archived forum site http www georeference org Forums tabid 7 1 forumid 7 tpage 1 view topic postid 13583 Default aspx 13586 227 Well worked out my dissolve function Thanks for those hints I found some useful stuff in the archives as well Now my problem is that when I come to select the polygons I wish to dissolve the only way I can do it is by opening the table which means the table pops up on the screen Is there a way to suppress this and still select the polygons What am I missing Rest of Program goes here Application StatusText Adding Records to MAStatus Drawing For i 0 to MACodeRecSet Count 1 theMA MACodeRecSet Item i DataText MACode Set MAQuery Components Components ItemByName MAQuery Note To Run this Query the ANSI compatible check box has to be ticked in the MAQuery properties Original line by dgillgren at 4 11 2006 7 12 PM 20408 below theText SELECT FROM amp blockDrawing Name amp amp _ i WHERE MACode amp theMA amp
99. specified already this sometimes happens with certain formats that save some but not all projection metadata I ve had this with TIF before code temp tag to be replaced DKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko ko ko ko Author Michael D Sumner Date December 10 2003 Version 1 0 1 mikemiq yahoo com au Platform Manifold 5 5 SP2 Not tested on any other Language VBScript Manifold System Permission to use modify and distribute this code is hereby granted providing this entire comment section is included No warranty is expressed or implied Yo Ck ck c Ck Ck Ck Ck Ck CC Ck Ck KKK KKK Ck kk Ck 0k Ck Ck Ck Ck kk Ck kk Ck Ck kk Ck kk Sk ck Kk Sk ko ko kx ko ko ko ko ko Sub Main define the projection and datum that I know my data are in GridToLoad Universal Transverse Mercator Zone 49 S DatumToLoad World Geodetic 1984 WGS84 iterate over all components set the Current projection of each surface saving the offset and scale parameters which are good Set comps Application ActiveDocument ComponentSet for each comp in comps If comp Type ComponentSurface Then retrieve the CS and parameters of the surface Set loader comp CoordinateSystem Set params loader Parameters NOTE that these parameters may be referenced by name using params param ItemByName localScaleX 149 Nex but here I just have the literal index
100. surface PixelSet 34 app StatusText Computing average height compute average height height 0 heightPixels 0 For i 0 To pixels Count 1 If i Mod 100 99 Then app StatusText Computing average height amp CStr i 1 amp of amp CStr pixels Count 1 amp End If Set pixel pixels i If Not pixel IsMissing Then height height CDbl pixel Value heightPixels heightPixels 1 End If Next If heightPixels 0 Then Application MessageBox All surface pixels are invisible Exit Sub End If height CDbl height CDbl heightPixels app StatusText Selecting pixels turn batch updates on app ActiveDocument BatchUpdates True select pixels For i 0 To pixels Count 1 If i Mod 100 99 Then app StatusText Selecting pixels amp CStr i 1 amp of amp CStr pixels Count 1l amp End If Set pixel pixels i If Not pixel IsMissing Then If pixel Value height Then pixel Mask pixel Mask Or 1 Else pixel Mask pixel Mask And Not 1 End If End If Nex turn batch updates off app ActiveDocument BatchUpdates False app StatusText Done End Sub Select Slope Sub Main Set app Application 33 locate opened window and ensure it displays surface Set window app WindowSet ActiveWindow Set component window Component If window Component Type ComponentSurface Then Application MessageBox No s
101. table can t seem to apply the coordinate system Please help me Here is my code Sub Main 111 Set document Application ActiveDocument Set components document ComponentSet Remove and Replace Qry Accomodation Do if cstr components i name PlotXY Then components Remove i Else i i 1 End If Loop Until i components Count create target drawing Set drawing document NewDrawing PlotXY Application DefaultCoordinateSystemLatLon Set objects drawing ObjectSet Set table drawing OwnedTable Set columns table ColumnSet Set records table RecordSet obtain source data readers My Position Table Set data components components ItemByName MyPosition Set dataColumns data ColumnSet Set dataRecords data RecordSet walk through data columns creating similar columns in target table For columnIndex 0 To dataColumns Count 1 Set dataColumn dataColumns columnIndex Set column columns NewColumn column Name dataColumn Name column Type dataColumn Type column Size dataColumn Size columns Add column Next walk through data records creating random points in target drawing For recordIndex 0 To dataRecords Count 1 create lat lon location Set point Application NewPoint create drawing object objects Add Application NewGeom GeomPoint point Set dataRecord dataRecords recordIndex transfer fields Set record record
102. tete EEE AEE ARNE eri SCM OUEST NEGA PEE 73 COMPUTE SHORTEST DISTANCE FROM POINT A TO A ROAD cesses een eene eee etnnnnn nne n enter nnne eren entran nns 73 ITERATING OVER THE ANALYZER OBJECTSET ccssssccccccecsessnsececececeessnsecesecccseseseaececcesesenseaeeeeecsesesaueaeeeeeesensneaeees 74 COM OBJECT MODEL EXTERNAL PROGRAMMING ENVIRONMENTS NET VBA ETC 75 BASIC SETUP OPERATIONS TO ACCESS THE MANIFOLD INTEROP DLL ASSEMBLY eee eene 75 How TO USE THE MANIFOLD OBJECT MODEL IN VB 2005 PROJECT INITIAL SETUP tees 77 CREATING A CUSTOM ADD IN PANE FROM MANIFOLD HELP scsscssessessssscssssscesssssessessesusssesucssssusssesnsseesnessessees 78 ADD IN PANE EXAMPLE URIS iicet eder R cere Fo os estere es eese ecd e aa ete hee leere ve ey Ee eve rove 81 MANIFOLD COM OBJECT MODEL DESCRIPTION AND NET USAGE THEORY cens 81 MANIFOLD OBJECT MODEL IN VB 2005 c cccccccccssssssececececescssuececececsesesecesececeeseseseeeceesesessaueceeecseseaaeaaeceseseseaeaeees 82 ADDING A COMPONENT TO AN ADDIN S LOADED COMPONENTSET ssssssssccecsessssececececsesssseceeececsenenseseeeesesenenseaeees 82 CALLING EVENTARGS WITHOUT USING THE ONCLICK METHOD cccccccccccceesessssececececeenssueceeececseneseeeeeeeeseneneaeees 84 VBiNETSAMPEBS aeree ie Gee vai bet sac ea dieti ad ea Coe soda ee eed Cee awk te pe eet eei ee oed 85 LOADING AND COMPILING THE MAPVIEWER PROJECT CONVERTING T
103. that control How to Create a Component View at the Desired Scale via VB Net http 69 17 46 171 Site Thread aspx id 20558 I m accessing a map file using VB Net I d like to create a view for a component at a desired cartographic scale e g 1 10 000 When we create a view it requires a scale but it s the scaleInternal It seems there no explanation in Manifold Manual on scaleInternal How can we create a view with desired cartographic scale paquet p s I know how to do this using component windows but since the map file is accessed in the background with VB Net windows can t be used I found the answer to this myself Here s how VB Net If it s useful for someone VKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK dim surfA as surface comps Surface A Calculate internal scale Dim dScale As Double 50000 1 50 000 Dim dScaleInternal As Double scale2scaleInternal dScale surfA Create the view Dim ViewSet As ViewSet surfA ViewSet Dim pt As Point surfA PixelSet Box Center Dim View As View app NewView View dScale ToString dScaleInternal pt X pt Y ViewSet Add View doc save DKK KKK KKK KKK KKK KKK Ck Ck KKK KKK KKK KK KKK KKK KKK ko ko ko ko Public Function getDisplayResolution As Double Dim frmTest As Windows Forms Form New Windows Forms Form frmTest AutoScaleMode Windows Forms AutoScaleMode Dpi getDisplayResolution frmTest CurrentAutoScaleDimensions Width frmTest
104. the map file is accessed in the background with VB Net windows can t be used I found the answer to this myself Here s how VB Net If it s useful for someone 1 Ckok KKK KKK KKK KK KKK KKK KKK KKK KK Ck Ck KKK KKK KKK KKK KKK KKK KKK Mk kx ko ko ko ko kockok Dim surfA as surface comps Surface A Calculate internal scale Dim dScale As Double 50000 1 50 000 Dim dScaleInternal As Double scale2scaleInternal dScale surfA Create the view Dim ViewSet As ViewSet surfA ViewSet Dim pt As Point surfA PixelSet Box Center Dim View As View _ app NewView View dScale ToString dScaleInternal pt X pt Y ViewSet Add View doc save Public Function getDisplayResolution As Double Dim frmTest As Windows Forms Form New Windows Forms Form frmTest AutoScaleMode Windows Forms AutoScaleMode Dpi getDisplayResolution frmTest CurrentAutoScaleDimensions Width frmTest Nothing End Function 1 ok ck ck ck ck Sk Ck Ck Ck Ck Ck Sk Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck kk Ck ck kk Ck kk ko Sk E Sk kx ko kx ko ko ko ko kockok Public Function scale2scaleInternal ByVal dScale As Double ByVal cmp As Component As Double Currently works for drawings and surfaces in meters Dim dDPI As Double getDisplayResolution Dim dInchInMeter As Double 0 0254 One inch is 0 0254 meter Dim dUnitsPerDot As Double T dInchInMeter dDPI 1 1 scale gives a scaleInternal of dUnitsPerPixel Fin
105. the drawing is projected into New Zealand Map Grid 1949 datum Can anyone shed any light on these issues Thanks 09 07 2005 8 48 AM amb Posted 09 05 2005 2 33 PM The intrinsic Area I calculation is consistently above the reported area for each covenant AND when compared to area calculated in ArcGIS is consistently above that as well The Area I column contains the Euclidean area in whatever projection the drawing is in To compute the real geographic area use an active column eg Function A Set objs Table Owner ObjectSet Set obj objs objs ItemByID Record Data ID A obj Geom Area 1000 1000 sq kilometres End Function 66 NOTE Code below is a modification of Adam s to calculate speed in nautical miles for the North Atlantic HURDAT tropical cyclone archive time step is 6 hours http www nhc noaa gov pastall shtml L Ketch Function Spherical Speed Table is Azimuthal Equidistant World Geodetic 1984 WGS84 Set objs Table Owner ObjectSet Set obj 0objs objs ItemByID Record Data ID convert metres to Nautical Miles Length nm obj Geom Length 0 000539594075 Spherical Speed Round Length nm 6 0 1 End Function amb Posted 09 05 2005 2 33 PM The intrinsic Area I field should report area in METRES squared but actually reports it in DECIMETRES squared Make sure the drawing is georegistered correctly It sounds like the local scale parame
106. the opened instance of Visual Basic set its text to lt xml version 1 0 gt lt xml gt lt addin gt lt name gt My Pane lt name gt lt command gt lt name gt My Pane lt name gt lt form gt MyPane dll MyPane MyPaneControl lt form gt lt command gt lt addin gt lt xml gt Save the MyPane xml file That s all To test the pane launch a new instance of Manifold Note that the Tools Add Ins menu contains a new command named My Pane Invoke that command to show the pane Create a new project The pane label should become blank Create a new drawing then press the pane button 80 The pane should report that the project map file contains two components a drawing and a table Save the project The pane label should update its text with the path to the map file Add ins and Forms Add ins can include forms used as modeless panes Forms can be either ActiveX controls or NET controls To include a form into an add in create a command item using the command tag supply the name of the form using the lt name gt tag and supply either the ProgID of the ActiveX control or the name of the NET control using the form tag The name of the NET control should include the name of the assembly or path to the assembly module either absolute or relative from the Config folder and the name of the NET class separated by a semicolon Tech Tips Manifold cannot use any customizations if the xml files do not contain
107. the path to the file Change the code above to point to the location of your training map file We could have entered the hardcoded path inside the Open method directly To test the code this time place the mouse cursor anywhere in the Tutorial Sub and hit F8 This will single step us into the subroutine Hit F8 again to go to the next statement Place the mouse cursor over filePath in the highlighted statement Hit F8 again and move the mouse over filePath again neat huh You can hit F5 anytime to run at normal speed through the rest of the code Note that Word s or Excel s main document window may not act as you expect while you are stepping through code Hit the Reset button on the toolbar before returning to the main document 90 Caution Word the VBA IDE and Manifold the program should not have the same map file open at the same time Manifold project files do not support multi user access Neither program may complain when they both open the same file but what happens when the programs close the map file is unpredictable Depending on what mistakes you make while writing code the IDE may become unstable and freeze up or fail to do anything but stop running Of course you may be able to avoid this by never making mistakes but as an alternative save your work early and often Keep backup copies of your map files as well Trapping Errors Word will complain at times when you make typing errors but once Word thinks t
108. the resulting Equal Count distribution is limited to the data in the sample which may not reflect a typical range of data Equal Interval may be a better stat but it still has data set related issues One way to deal with this is to make a Theme xml that is close then hand tweak it to cover the expected values The theme from either Interval type is identical For example xml theme type color type lt interval gt true interval gt lt column gt Globvalue column gt lt colors gt color gt f 5e60c color gt color gt 65e13d color gt color gt 00b23d color gt color gt 067d1d color gt color gt 1 4791 color gt lt colors gt lt colorMin gt cd853 colorMin gt lt colorMax gt 1 4791 colorMax gt lt colorDef gt cd853f colorDef gt lt values gt value gt 0 00 value gt value gt 1 00 value gt value gt 2 00 value gt value gt 3 00 value gt value gt 4 00 value gt lt values gt lt theme gt xml Adding a True Type Font Symbol http 69 17 46 171 Site Thread aspx 1d 19413 amp ti 632774325922900000 xml lt style gt lt name gt ESRI Cartography 00F6 lt name gt ESRI Cartography lt symbol gt 00F6 lt symbol gt lt type gt point lt type gt lt style gt lt name gt ESRI Cartography 002C lt name gt ESRI Cartography lt symbol gt 002C lt symbol gt lt type gt point lt type gt lt style gt xml 320
109. to Manifold L and a reply from Adam 2 some information gleaned from the old GeoReference site with an Active Column solution for calculating spherical area and distance http forum manifold net Site Thread aspx id 145 17 amp ti 632622901030000000 adamw on 9 7 2005 8 48 AM 14563 I modified it to determine spherical distance speed It calculates the same values that Mapinfo would give Sent Mon 01 23 2006 4 37 PM To Manifold L lists directionsmag com From Lorne Iketch hfx eastlink ca Subject Spherical Calculation of Distance and Area http lists directionsmag com discussion read php f 29 amp i 41388 amp t 41388 I am trying to gain some insight into how Manifold handles distance and area calculations My Drawing consists of storm tracks that can cover much of the North Atlantic Ocean A single storm consists of multiple lines segments with each segment representing a 6 hour portion of the track Tabular data such as pressure maximum wind speed etc are tied to each track segment Track segments for a given event can be grouped by a storm ID I would like to be able to calculate the length of each 6 hour segment in nautical miles That figure will be divided by 6 to get a 6 hour speed in knots When I was using Mapinfo this calculation could be done using an Update SQL statement like that shown below That string returns the same numbers regardless of the projection or lack of i e it works for Latitude Long
110. to Manifold Projects Internal Drawing Tiles Using Drawing Index http forum manifold net Site Thread aspx id 1967 amp ti 63300508 1137170000 154 export to separate Manifold projects but should be easily Here I something similar for adaptable for images WARNING this is unsupported code it worked once upon a time for me but I ve not used it in a while Sub Main dir C Documents and Settings WmdsumnerMMy Documents NCODEMManifoldNImageTilesN Set doc Application ActiveDocument Set comps doc ComponentSet Set dwg2Render comps CountriesAreas Set dwgTiles comps Tiles this section will render an image width 400 height 400 for each tile in dwgTiles ObjectSet Set tile dwgTiles ObjectSet 0 here get the tile number from the recordset imgName Tilel Set record _ dwgTiles OwnedTable RecordSet Item dwgTiles OwnedTable RecordSet ItemByID tile ID imgName Tile amp record Data tilenumber need to use BranchSet here bug in 5 50 SP2 Set tileBox tile Geom BranchSet 0 Box dwg2Render RenderAreaTo imgName width height tileBox TRUI Gl Set imgTile comps imgName this section will create a new project file with an image then remove it from this one docFile dir amp imgName amp map record Data projectName docFile Set newDoc Application NewDocument docFile FALSI Gl imgTile Copy newDoc Paste new
111. understand the rudiments of working within Visual Studio it really is worthwhile trying some fairly simple things there and then if it is a better way to achieve what you want within the Manifold project MAP environment without an external application to take the principles you have learned and do the same lessons or exercises with VBScripts It would probably be helpful to some people to see much the same simple operations done in both ways It would not be difficult to set up simple tutorials that did that We re not all trying to be gun programmers after all KlausDE on 12 16 2006 3 41 PM 32323 1 Adda Reference to Manifold Interop in VS2005 Menu Project Add Reference COM gt Manifold System Type Library OK 2 Create a Form a Addthe Manifold ActiveX from the Toolbox to the Form The ActiveX Control is named Manifold MapControl Object In the Object Browser and in many threads in this forum you will find it named AxComponentControl in AxManifold Interop b Set properties Filename and Component to the path to an existing project and a component name existing in this project Creating a Custom Add in Pane from Manifold Help Add ins can be used to create custom panes This example demonstrates how to create a custom pane using Visual Basic 2005 Express 78 1 Launch Visual Basic 2005 Express Create a new Class Library project File New Project Class Library named MyPane 2 In the Solution Explo
112. want within the Manifold project MAP environment without an external application to take the principles you have learned and do the same lessons or exercises with VBScripts Adding a Component to an Addin s Loaded ComponentSet See the bolded text for main information http forum manifold net Site Thread aspx id 29079 njengler on 10 19 2006 11 01 AM 29080 I am getting a strange error and I am wondering if it is a a Manifold bug or b something strange in my code I am working on a VB NET Add In for Manifold The following lines of code gComponentSet gApplication ActiveDocument ComponentSet gDocument gApplication DocumentSet Item 0 mFolder gDocument NewFolder Name 82 gComponentSet Add mFolder Work perfectly if I open Manifold load my Add In which opens a Pane and then load a project I have Manifold Interop Scripts EventsConnection implemented so my Add In knows when a project is opened However if I open Manifold load the project and then load my Add In I get the following error Cannot add component to component set However the folder is actually added and Manifold seems to continue on fine after I close the error message box I have searched out all the obvious things that I can think of that might cause this problem and nothing seems to be different between the two scenarios described above Any help or thoughts would be greatly appreciated willh on 10 20 2006 10 01 AM 29150 Y
113. width equals longest entry in that column 1 character Quotes TRUE Adds double quotes to the text column values ColumnTypeAChar ColumnTypeAText ColumnTypeWChar ColumnTypeWText Include ColumnNames The first line will contain the column names If Quotes True then double quotes will surround the column names This function will SELECT the columns in Column Names FROM the table named Source Table Name The resulting table display will be moved into a Comments component named Formatted Records Using a TAB separator will allow direct copy and paste into a spreadsheet like Excel which will recognize the TABs and automatically parse the fields correctly to separate cells however you can use any separator character s Text in Formatted Records is automatically copied to the Windows Clipboard at the end of the routine Comps Qry Report Report Comp Rcrd Rcrds Col Cols 231 Dim Col Index Last Col Index Dim ColName String Dim Add Quotes Dim Fixed Width Dim Column Widths Column Width W Dim Str Padding Dim Record Count Set Comps Document ComponentSet Make sure the Query component exists If Comps ItemByName Query lt 0 Then Set Ory Document NewQuery Query Else Set Ory Comps Item Query End If Does the Comment Component used for the Formatted Records exist If Comps ItemByName Formatted Records lt 0 Then
114. 00000000000000000e 003 Nautical Mile nm sq nm 1 852000000000000000000000e 003 Radian rad sq rad 5 729577951289599700000000e 001 True Rod r sqr 5 029200000000000300000000e 000 Sazhen szh sq szh 2 133300000000000200000000e 000 Sea League slg sq slg 5 556000000000000000000000e 003 Sears Chain ch Srs sq ch Srs 2 011676512155260000000000e 001 Sears Foot ft Srs sq ft Srs 3 0479947 15386759800000000e 001 Sears Link In Srs sq In Srs 2 011676512155259900000000e 001 Sears Yard yd Srs Sq yd Srs 9 143984146160290000000000e 001 276 Name Nickname Nickname Area Value Lat Long US Survey Chain ch US sqch US 2 011684023368049900000000e 001 US Survey Foot ftUS sq ft US 3 048006095999999900000000e 001 US Survey Link In US sq In US 2 011684023368050000000000e 001 US Survey Mile mi US sq mi US 1 609347218694440000000000e 003 Vershok Vh sq vh 4 445000000000000300000000e 002 Verst Ve sq ve 1 066800000000000000000000e 003 Yard Yd sq yd 9 144000000000001000000000e 001 277 Preset Definitions Style Lists System Dependant Manifold System 7x Release Notes http www manifold net updates release notes 7x htm The command line has been extended with a new slist option which dumps the names of all formatting styles available for areas labels lines and points into a text file Example syntax manifold exe slist file txt To specify the full program path and path to the resultant text file use th
115. 000000000e 002 Chain ch sq ch 2 011661949999999900000000e 001 Clarke s Chain ch Cla sq ch Cla 2 011661949000000100000000e 001 Clarke s Foot ft Cla sq ft Cla 3 047972650999999900000000e 001 Clarke s Link In Cla sq In Cla 2 011661949000000100000000e 001 Clarke s Yard yd Cla sq yd Cla 9 143917950000000100000000e 001 Decimeter dm sq dm 1 000000000000000100000000e 001 Fathom f sqf 1 828800000000000000000000e 000 Foot ft sq ft 3 048000000000000200000000e 001 German Legal Meter Glm sq Glm 1 000013596500000100000000e 000 Inch in sq in 2 539999999999999900000000e 002 Indian Foot Ind ft sq Ind ft 3 047876058000000300000000e 001 Indian Foot 1937 Ind ft 37 sq Ind ft 37 3 047984 100000000200000000e 001 Indian Foot 1962 Ind ft 62 sq Ind ft 62 3 047996000000000000000000e 001 Indian Foot 1975 Ind ft 75 sq Ind ft 75 3 047995000000000000000000e 001 Indian Yard Ind yd sq Ind yd 9 143985307444410000000000e 001 Indian Yard 1937 Ind yd 37 sg Ind yd 37 9 143952300000000000000000e 00 1 Indian Yard 1962 Ind yd 62 sg Ind yd 62 9 143987999999999600000000e 001 Indian Yard 1975 Ind yd 75 sg Ind yd 75 9 143985000000000000000000e 00 1 Kilometer km sq km 1 000000000000000000000000e 003 Kosaya Sazhen kszh sq kszh 2 480000000000000000000000e 000 League Ig sq lg 4 827899999999999600000000e 003 Link In sq In 2 011661949999999900000000e 001 Micrometer mcm sq mcm 1 000000000000000000000000e 004 Mile mi sq mi 1 609344000000000100000000e 003 Millimeter mm sqmm 1 0000000
116. 3 Table Nwind Forms walks through categories displaying list of products for current category Category Viewer E Catesory Viewer Category Beverages tH Products C te de Blaye Chai Chang Chartreuse verte Guaran Fant stica Ipoh Coffee Lakkalik ri Laughing Lumberjack Lager N First Previous Next Last Close 1 Ok Ck KC KK C I I I S S I S amp M S M amp M amp M M amp M amp amp KG amp UU UU IM launch form on startup Sub Main Form Visible True End Sub 1 COkCk ck Ck Kk KK I I I I I I I S S S S S M S M S amp S amp M A M amp M amp M M amp M amp amp KG amp KG GM M Dim Categories CategoryIndex 1 CategoryCount 10 jump to first category on load 1 kkxkxkxkxx xkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkkxkxkxkxkxkkxkxkxkxkxkkxkxkkxkxkxkxkxkxkxkxkxkxkxkkxxkxx k Sub Form OnLoad set up global variables Set Components Application ActiveDocument ComponentSet CatPos Components ItemByName Categories If CatPos 0 Then Application MessageBox Categories table not found Form Visible False End If Set Categories Components CatPos CategoryIndex 0 CategoryCount Categories RecordSet Count load controls Reload End Sub 44 VK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK Ck Ck KKK KKK KKK KK KKK KKK KKK KK KKK KKK KKK k ko ko ko ko close form Sub Close Click Form Visible Fals
117. 4 y 6 54 Set Pnt Application NewPoint x y Set Geom Application NewGeom GeomPoint Pnt objcts add Geom Klaus Creating a New Geom and Adding it to a Drawing ObjectSet http 69 17 46 171 Site Thread aspx id 19973 amp ti 632792795307870000 How do I create a rectangle with give x and y min and max When I used the script below I don t see the rectangle Set newrect application NewRect newxmin newymin newxmax newymax Can anyone tell me whats wrong in this script 287 Thanks What you see in a Drawing is a Set of Objects not just any graphical representation stored in the application Get the ObjectSet of the Drawing and add a Geom To create the Geom you have to fill the PointSet with the coordinates of the Rectangle VBScript Set PSet application NewPointSet PSet add application newPoint newxmin newymin PSet add application newPoint newxmin newymax PSet add application newPoint newxmin newymin Set NewG application NewGeom PSet Set comps application components Set drwng comps Name of Drawing Set OSet drwng ObjectSet OSet Add NewG not tested Klaus A tested version with an example you need an existing Drawing Sub Main newxmin 10 newxmax 10 newymin 10 newymax 10 Set PSet application NewPointSet PSet add application newPoint newxmin newymin PSet add application newPoint newxmax newymin PSe
118. 436 Default aspx 2440 Set Doc Application ActiveDocument Set Comps Doc ComponentSet Set Comp Comps ComponentName Set Objs Comp ObjectSet For Counter Objs Count 1 to 0 Step 1 Objs Remove Counter Next End Sub ELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLILEL Plotting Points Equidistant along a Line Script Approach 1 Bob Heiztman 01 19 2004 3 43 PM http www georeference org Forums tabid 71 forumid 7 tpage 1 view topic postid 936 Default aspx 936 Here is a script I developed as an exercise in plotting points along a line It will develop milestones along a line See script for details on user settings Manifold 5 5 SP2 Author Bob Heiztman Jan 2004 Script will add points along single SELECTED line in the active window Active window should contain a projected drawing User should edit script to provide the distance between mileposts 199 Option Explicit VK KKK KKK KKK KKK KK KKK KKK Ck Ck Ck Ck KKK KKK KKK KKK KKK KKKKKKKKKKKKKK Sub Main Dim drawinglIn drawingOut objects object Dim mpLength legLen branch i s ptl pt2 Dim lenTo angleTo distance postPt fromPt bal user settings mpLength CDb1 1609 distance between mile posts in meters get active drawing window Dim doc windows window comps Set doc Application ActiveDocument Set comps doc ComponentSet If True Then True use active window Set windows Application WindowSe
119. 5 Default aspx 1246 02 12 2004 10 37 PM You have to delve into the Format object of the drawing which is read only into its FormatValue object and change its Formatting property which is read write This example might help you get started Sub Main Set Comps Document Componentset Set Comp Comps Drawing Y increase the point size Format Comp PointSize DefaultValue Format DefaultValue Sel se Cr CT defaultValue Formatting 40 change the point style Set Format Comp PointStyle Set DefaultValue Format DefaultValue 235 DefaultValue Formatting 2 End Sub Query Caching BE CAREFUL when rerunning the same Query Text via Code Note to me L Ketch I was having a lot of problems with determining how many Records were selected in a drawing after upgrading to V7 Code like that below often gave incorrect results when repeatedly run first time correct but subsequent runs wrong if the number of objects selected changed It turns out that Query results are cached for greater speed but you may need to force a recalculation You could do this by setting Query Text then resetting the original query It also turns out that Manifold provides direct support for doing this as Adam explains below Query Text Select From Drawing where Selection 1 Set Table Query Table Application Messagebox cStr Table Recordset Count amp Records are Selected From adamw manifold net
120. 805024700000 Does anyone know of a good way to understand how to use the Manifold Object Model in Visual Basic 2005 I have watched the GIS Advisors VB Script training video which is very helpful for scripting in Manifold but I am struggling with implementing in VB 2005 How do I do something like Zoom to Selection It seems so simple in Manifold but I must not be using the objects correctly in VB 2005 I will start another thread with that question dmcullen I m glad your question mentions Visual Basic 2005 since it implies that you are working within the Visual Studio VS2005 IDE development environment It s MUCH harder when trying to work out the Manifold object model when one is scripting with VBScript within the Manifold user interface However There is an object model diagram that can be downloaded The User Guide has sections on scripting and programming They are brief but useful Personally I would suggest that they would be better separated into another document or Programmers Guide along with some quite simple help information but the information is available albeit sparse and stark Within Visual Studio Once you have set a reference in VS2005 to Manifold Interop don t you have IntelliSense kicking in to help you like other objects referenced within the VS IDE That is very helpful It is possible to use the Object Browser panel within Visual Studio and have a look at the object model that way If you
121. 9 17 46 171 Site Thread aspx id 23644 amp ti 63288 1130615630000 How to have some layers unchecked when a webpage is loaded http 69 17 46 171 Site Thread aspx id 22635 amp ti 632862969446400000 Set layer to layer off http 69 17 46 171 Site Thread aspx id 16433 amp ti 632677302410000000 Published layers http 69 17 46 171 Site Thread aspx id 10545 amp ti 632496579000000000 How to disable layers on startup http 69 17 46 171 Site Thread aspx id 38 17 amp ti 6322728 18600000000 My question is what does the following line of code do I understand that it is setting the value of variable layerDefv but I m not familiar with what the and the might be doing The function parameter also uses this syntax or something similar 174 var layerDefv command startup on It is saying that if command startup then layerDefv on otherwise layerDefn As far as I can see it is a computationally faster way of writing an if else conditional statement but I am not really all that sure James Layer Code turn on off IMS http 69 17 46 171 Site Thread aspx id 23644 amp ti 63288 1130615630000 When a particular layer is unchecked and Apply is clicked I want to turn off other layers So say if highways are turned off I want highways labels to also turn off To do this I ve used the variable layerChck if layerList layerItem layerChck parameter layer layerSqno
122. 94 Lines Line Intersects Line at Coordinates http www georeference org Forums tabid 7 1 forumid 4 tpage 1 view topic postid 243 6 Default aspx 2440 http forum manifold net Site Thread aspx id 2824 amp ti 6322 18042200000000 Also see the heavily modified version that follows Find Line Interest Coordinates L Ketch mdsumner on 6 2 2004 8 17 PM 2829 Sub Main Set doc Application ActiveDocument Set comps doc ComponentSet Set comp comps Drawing get the objects in the drawing assuming all are lines here Set objects comp ObjectSet get the intesection points Set pts objects GeomSet IntersectionPoints is precision an issue eps 0 1 Set pts objects GeomSet IntersectionPoints eps report Application Messagebox pts count Set aPt pts Item 0 Center Application Messagebox X amp aPt X amp vbcrlf amp Y amp aPt Y End Sub Find Line Intersect Coordinates L Ketch Highly modified version of Mike Sumner s code obtained from http www georeference org Forums tabid 71 forumid 4 tpage 1 view topic postid 2436 Default aspx 2440 thinpig 06 02 2004 5 31 PM Alert Which object or method can I call in order to get the X Y coordinate of two lines which are intersected It can be easily done by using Transform tool bar but how can I apply it by script mdsumner 06 02 2004 8 17 PM Alert This script assumes that your
123. Active window must be a drawing Exit sub End If get the selection in the drawing Set selectImg Component Selection If selectImg Count 0 Then Application Messagebox No image tiles selected exiting Exit Sub End If just import the first one Set imgArea selectimg 0 Set imgRecord Component OwnedTable RecordSet Component OwnedTable RecordSet ItemByID imgArea ID FileName imgRecord Data FileName Ext UCase Right FileName 3 If Ext TIF Then Ext TIFF Set Importer Application NewImport Ext Importer Import FileName Set Image Importer ComponentSet 0 set the image s CURRENT projection ProjToLoad imgRecord Data Projection bug in SP2 requires use of first branch s Rect object rather than that of geom sclX imgArea Geom BranchSet 0 Box Width Image Width SclY imgArea Geom BranchSet 0 Box Height Image Height offX imgArea Geom BranchSet 0 Box Xmin offY imgArea Geom BranchSet 0 Box Ymin Set Proj Application NewCoordinateSystem ProjToLoad Proj Parameters Proj Parameters ItemByName localScaleX Proj Parameters Proj Parameters ItemByName localScaleY Proj Parameters Proj Parameters ItemByName localOffsetXx Proj Parameters Proj Parameters ItemByName localOffsetY value sclX value sclY value offX value offY ee Image CoordinateSystem Proj Image Open End Sub Export
124. Analyzer ObjectSet Analyzer S either For Each or For VBScript method 1 For Each o In spath tx electShortestPath returns an ObjectSet which you can iterate over directly using t o Record Data Length I o Record Data Speed Next method 2 For i 0 To spath Count 1 Set o spath i t o Record Data Length I o Record Data Speed Next 74 COM Object Model External Programming Environments NET VBA etc Basic Setup Operations to Access the Manifold Interop dll Assembly Typical project setup actions Add Reference Setting a reference to Manifold Interop Menu Project Add Reference Select the COM tab e Select Manifold System Type Library Component Name x LIRE V7x name LM Library 1 0 Logger 1 0 Type Library 1 0 Irbl10 1 0 Type Library 1 0 LuComServer 1 0 Type Library 1 0 Manifold System Type Library 3 5 Marquee OLE Control module 1 0 iy References C3 Manifold r l 2 stdole ie Moria Mns 2 System will now show under 3 System Data References 3 System Deployment C3 System Drawing C3 System Windows Forms C3 System Xml Setting a references to Add Reference Manifold Interop Ner COM Projects Browse Recent and Look in C3 Manifold System Manifold Interop Scripts Manifold ImageServer dll Manifold ImageServer Manifoldir e Click the Browse tab of the Add Reference dialog e Browse to the Man
125. Analyzer SelectTouching layerl Component layerl Component ObjectSet ZBoundBox ObjectSet next End Sub Thematically Mapping Precipitation Amounts using Point Themes http 69 17 46 171 Site Thread aspx 1d 22795 amp ti 632901092226900000 I found where the National Weather Service stores the rainfall totals I can write basic queries to present the data in thematic view but I lack the query writing skills to make them look 100 Would anyone like to write a few queries for a thematic rainfall display Here is where the NWS stores the live reports it is in SHP format and the recordings are in a gridded format ftp 63 77 98 88 pub rfcshare precip new I just want to say great job with 7 0 and thank you in advance for any help How about this Unpack TAR GZ into TAR Unpack TAR into SHP SHX DBF etc Import SHP using File Import Drawing SHP using default import options Open the imported drawing Click the Point Foreground button in the Format toolbar and select Theme Set Field to Globvalue Set Method to Equal Count Set Align to 2 to avoid excessive rounding Set Breaks 209 to 6 Click Tally Set Palette to Precipitation Press the Apply button in the toolbar right above the value list Click OK Do the same for point background color There are two alternatives Alternative 1 Transfer formatting from point foreground color Click the Point Foreground color button in the Format toolbar and select Theme
126. Application Messagebox REPLACES MsgBox SS Set Comps Document ComponentSet REPLACES Set Comps _ SS Application ActiveDocument ComponentSet SS L Ketch Nov 2006 bee HH HH HH TE FE EE EE HE HE EE EE FE E TE FE E TE EE EE EE EE EE HEE EE EE EE EE EE EE EE EE EE EE EEF TerrainFlyThrough illustration of scripted terrain fly through 130 SSSSSSSSSSSSSSSSSSSSSSsssssssssssssssssssssssssssssssssssssssssssss Sub Main Dim Comps Dim Drwg Name htColumnName Dim dZ zOffset waitThisLong Dim wSet Win DrwgID Drwg Dim Rcrds DrwgObjs Obj Dim ptSet Ptl Pt2 Bearing nPt n Dim WScript NumberOfObjs IMPORTANT Make sure the Drawing containing the fly through track lie has exactly the same projection parametres as the surface terrain SET THE FOLLOWING FIVE PROGRAM PARAMETRES choose the z direction of the camera looking down a bit dz 4 how high above the surface zOffset 100 the number of seconds to wait between each move use small values like 0 1 waitThisLong 1 Drwg Name of drawing component to look for Drwg Name Track2 492segments Drwg Name Drawing 1179segments Drwg Name of column in drawing s table containing line heights THIS IS ASSUMED to exist htColumnName Height EL END PROGRAM PARAMETRES NANN Set WScript CreateObject WScript Shell Set Comps Document ComponentSet obtain active terrai
127. CDbl band2p Value bandlp Value End If If i Mod 100 0 Then Application StatusText CStr i out of CStr ndvi Count pixels processed End If Next flush update queue 23 document BatchUpdates False open computed NDVI surface components components ItemByName NDVI Open End Sub Quartiles assigns values in the given numeric column to quartiles Assigns values in the given numeric column to quartiles expressed as a value from 1 to 4 in a new integer column Sub Ma in ensure there is active window Set windows Application WindowSet If windows Count 0 Then Exit Sub End If Set window windows ActiveWindow Set component window Component ensure active component is table If component Type ComponentTable Then End Exi If t Sub ensure table contains at least one record Set records component RecordSet If records Count 0 Then Exit Sub End If query for field name columnName InputBox Enter numeric column name Quartiles window ActiveColumn Name If Trim CStr columnName Then Exit Sub End If check of column type and name columnlIndex component columnSet ItemByName columnName If columniIndex lt 0 Then Application MessageBox Can t find column amp columnName amp Exit Sub End If Set column component ColumnSet columnIndex If Not column IsTypeNumeric Then Application Mes
128. Ck Ck kk Ck CK Ck Ck Ck Ck Ck Ck Ck Kk Ck Ck Sk Ck Ck Ck Ck Ck Ck Ck Ck kk kk kk Ck ck kk Ck kk ko Sk kk ko ko kv ko ko kx ko ko ko Sub Main Call Screenshot 800 600 End Sub 1 Ckokckck ck ck ck Ck ck kk Ck CK Ck Ck Ck CK Ck Ck Ck Ck CK Ck Ck Ck Ck Ck Ck Ck Kk Ck kk Ck kk Ck Ck Ck Ck kk Ck ck kk Ck kk Sk Sk kk kx Sk kv Sk ko ok ko ko DKK KKK ck ck ck ck kk Ck Kk Ck Ck CK Ck Ck Ck Ck kk Ck Ck Ck Ck Ck Ck kk Ck Ck Ck Ck kk Ck Ck Ck Ck kk Ck ck kk ko kk ko Sk kk Sk Kk kv ko kx k ko ko ko Sub Screenshot x y 60 or S obtain context component and ensure it is drawing image labels map or surface Set windowSet Application WindowSet If windowSet Count lt 0 Then Application MessageBox No opened windows Exit Sub End If Set window windowSet ActiveWindow Set component window Component If component Type lt gt ComponentDrawing And _ component Type lt gt ComponentImage And _ component Type lt gt ComponentLabels And _ component Type lt gt ComponentMap And component Type lt gt ComponentSurface Then Application MessageBox Active window should contain drawing image labels map surface Exit Sub End If render context component to image and place image into a folder named creenshots Set document Application ActiveDocument If document ReadOnly Then Application MessageBox Can t create new image component Document is read only Exit Sub End If
129. Click the Save to File toolbar button Edit the filename and click Save Close the Format dialog Click the Point Background color button in the Format toolbar and select Theme Set Field to Globvalue Click the Load from File toolbar button Locate the file and click OK Click the Lighten button in the toolbar optional Click OK Alternative 2 Set point style to the one that does not use the background color eg the filled dot style in the second position of the first row in the style drop down well rheitzman at 6 21 2006 2 50 PM 23054 Something to watch for using this method is that the resulting Equal Count distribution is llimited to the data in the sample which may not reflect a typical range of data Equal Interval may be a better stat but it still has data set related issues One way to deal with this is to make a Theme xml that is close then hand tweak it to cover the exepcted values The theme from either Interval type is identical For example The original began with lt xml version 1 0 encoding UTF 8 gt I think that xml is required xml theme lt type gt color type gt lt interval gt true interval gt lt column gt Globvalue column gt lt colors gt color 4f5e60c color color gt 65e13d color gt color gt 00b23d color gt color gt 067dld color gt color gt 1 4791 color gt lt colors gt lt colorMin gt cd853 colorMin gt lt colorMax gt 1 4791
130. ColumnTypeFloat64 Cols Add Col Set Col Cols NewColumn Col Name localScaleY Col Type ColumnTypeFloat64 Cols Add Col Set Col Cols NewColumn Col Name ScaleCorrectionX Col Type ColumnTypeFloat64 Cols Add Col Set Col Cols NewColumn Col Name ScaleCorrectionY Col Type ColumnTypeFloat64 Cols Add Col Set Col Cols NewColumn Col Name FalseEasting Col Type ColumnTypeFloat64 Cols Add Col Set Col Cols NewColumn Col Name FalseNorthing Col Type ColumnTypeFloat64 Cols Add Col 124 Set Col Col Name Col Type Set Col Col Name Col Type Cols NewColumn majorAxis ColumnTypeFloat64 Cols Add Col Cols NewColumn Eccentricity ColumnTypeFloat64 Cols Add Col Set Col Cols NewColumn Col Name CoordSys XML Col Type ColumnTypeWText Col Size 2000 21000 required here or the script fails Cols Add Col Set Rcrds CoordSys Table RecordSet For Each Map Layer in Map Layers Set Comp Map Layer Component Set Coord Sys Comp CoordinateSystem Set CoordSys ParmSet Coord Sys ParameterSet Rcrds AddNew Set Rcrd Rcrds LastAdded Rcrd Data MapLayer Comp Name Rcrd Data CoordSys Name Coord Sys Name Rcerd Data Datum Coord Sys Datum Name Rcrd Data EllipsoidName Coord Sys Datum Ellipsoid Name Rcrd Data CoordSys Unit Coord Sys Unit Name Rcrd Data localOffsetX CoordSys ParmSet Item localOffsetX
131. Curvature amp windowsize amp x amp windowsize ValueTypeFloat64 surface coordsyst 0 horcurv Folder Set horcurv pxset tot cols tot rows folder horcurv PixElset End If calculate border effect area start row offset end row tot rows offset 1 start col offset end col tot cols offset 1 If cs true or co true or cvc true or chc true then manage loops across the surface For rowco unt start row to end row For colcount start col to end col Set Z5 surface pxset item surface pxset ItemByXY colcount rowcount Set Z2 surface pxset item surface pxset ItemByXY colcount rowcount offset Set Z8 surface pxset item surface pxset ItemByXY colcount rowcount offset Set Z4 surface pxset item surface pxset ItemByXY colcount offset rowcount Set Z6 surface pxset i If tem surface pxset ItemByXY colcounttoffset rowcount cvc true or chc true then 138 offset rowco surface pxse offset rowco offset rowco vertcurv pxs Set Z1 unt offset Set Z3 t item surface pxset ItemByXY colcountt offset rowcount offset Set Z7 surface pxset item surface pxset ItemByXY colcount unt offset Set Z9 surface pxset item surface pxset ItemByXY colcount untt offset End If surface pxset item surface pxset ItemByXY colcount If cvc true then Set VC5 et item vertcurv pxset ItemByXY colcount rowcount End If
132. Dim cityTable cityRecords cityRecord countryTable countryRecords countryRecord Set cityTable cityDrawing OwnedTable Set cityRecords cityTable RecordSet Set countryTable countryDrawing OwnedTable Set countryRecords countryTable RecordSet ensure both tables contain country column If cityTable ColumnSet ItemByName Country lt 0 Then 30 Application MessageBox No Country column in Cities Exit Sub End If If countryTable ColumnSet ItemByName Country lt 0 Then Application MessageBox No Country column in Countries Exit Sub End If batch updates here if the number of cities is large Application StatusText Cleaning up cities cleanup cities For cityIndex 0 To cities Count 1 Set city cities cityIndex Set cityRecord cityRecords cityRecords ItemByID city ID clean up country field cityRecord Data Country cleanup other fields here if necessary Next Application StatusText Transferring data transfer columns from countries to cities going by countries so that each country gets simplified only once For countryIndex 0 To countries Count 1 Application StatusText CStr countryIndex 1 of CStr countries Count countries Set country countries countryIndex Set countryRecord countryRecords countryRecords ItemByID country ID Skip point and line objects that can get created by the user I
133. Doc Save comps Remove comps ItemByName imgName Next End Sub 155 Export a Surface Straight to Image Format Manifold L Jan 18 2006 Date 01 18 2006 18 48 http lists directionsmag com discussion read php f 29 amp i 4 1362 amp t 41355 I thought you would need to render the surfaces first as an image then export those to JPEG but not apparently you can export a surface straight to image format Note that you can t do this in the GUI There are examples on www georeference org in the archived site that will help you obtain all the surfaces in a folder and export each to image file Post further questions there if you need help Here s the basic VB script for doing one explicitly Sub Main Set doc Application ActiveDocument Set comps doc ComponentSet Set comp comps Surface Set expt Application NewExport JPEG expt Export comp C temp image jpg End Sub Exporting Surfaces as Images http 69 17 46 171 Site Thread aspx 1d 18134 amp ti 632736022437170000 Sub Main Set doc Application ActiveDocument Set comps doc ComponentSet Set comp comps Surface Set expt Application NewExport JPEG expt Export comp C temp image jpg FALSE End Sub 156 Exporting All Images in a Project Manifold L Author Adam Wachowski Date 03 04 2006 09 27 http lists directionsmag com discussion read php f 29 amp i 4 1743 amp t 41727 Sub
134. Document ComponentSet Set CoordSys Drwg CoordinateSystem Set CoordSys ParmSet CoordSys ParameterSet If Component Exists Query Then Set Ory Comps Query Else Set Ory Document NewQuery Query End If Comment 1 will hold a formatted coordinated list If Component Exists Object Coords 1 Then Set Comment 1 Comps Object Coords 1 Else Set Comment 1 Document NewComments Object Coor End If Comment 2 will hold an unformatted coordinated 1 Just X and Y s tab delimited will past into and will be automatically parsed to separate cel If Component Exists Object Coords 2 Then Set Comment 2 Comps Object Coords 2 Else Set Comment 2 Document NewComments Object Coor End If If Mode 1 Then Set Objs Drwg ObjectSet Selected Objects Objects Qry Text Update Select Selection I as Sele From amp Drwg Name amp amp Set Selection TRUE Ory RunEX TRUE Elself Mode 2 Then ds 1 ist Excel ls ds 2 ction amp Qry Text SELECT FROM amp Drwg Name amp WHER Ory RunEX TRUE Set Rcrds Qry Table RecordSet If Rcrds Count 1 Then Application MessageboxEX _ Manually select one or more objects from draw amp Drwg Name amp before running this opt E Selection I ing amp VbCrLf amp ion Not Ready _ MessageBoxTypeOK OR MessageBo
135. DrawingTopologyFactoryGoNext DrawingTopologyFactoryGoPrevious DrawingTopologyFactorySortAlphabetic DrawingTopologyFactorySortAlphabeticBlanksLast DrawingTopologyFactorySortRecommended DrawingTopologyFactorySortRecommendedBlanks Last DrawingTopologyOverlay DrawingTransformAttachTo DrawingTransformAttachToSelf DrawingTransformBorderBuffers DrawingTransformBoundaries DrawingTransformBoundedAreas DrawingTransformBoundingBoxes DrawingTransformBuffers DrawingTransformCentroids DrawingTransformCentroidsBox DrawingTransformCentroidsInner DrawingTransformCentroids Weight DrawingTransformClip WithIntersect DrawingTransformClip WithSubtract DrawingTransformClusters DrawingTransformClustersZahn DrawingTransformCommonBoundingBox DrawingTransformCommonBuffer DrawingTransformCommonCentroid DrawingTransformCommonEnclosingCircle DrawingTransformCommonEnclosingRectangle DrawingTransformConvexHull DrawingTransformDecompose DrawingTransformDecomposeToConvexParts DrawingTransformDecomposeToTriangles DrawingTransformDistanceNetwork DrawingTransformEnclosingCircles DrawingTransformEnclosingRectangles DrawingTransformExplode DrawingTransformFarthestNeighbor DrawingTransformFarthestNeighborSymm 267 DrawingTransformF arthestPair DrawingTransformF lipHorizontally DrawingTransformF lip Vertically DrawingTransformGabrielNetwork DrawingTransformInnerBuffers DrawingTransformIntersectLines DrawingTransformIntersectionPoints DrawingTransformJoinLines Drawin
136. Email Ketch at hfx dot eastlink ca Dim Comps Ory Dim SQL Where Clause Rcrds Mode Which Objects to process All Selection Points Lines Areas Points and Lines Points and Areas Lines and Areas OAID T S uana He Set Comps Document ComponentSet If Component Exists Query Then Set Ory Comps Query Else Set Ory Document NewQuery Query End If If Mode 1 Then Drwg SelectNone Where Clause ElseIf Mode 2 Then Qry Text SELECT FROM amp Drwg Name amp WHERE Selection 1 Ory RunEX TRUE Set Rcrds Qry Table RecordSet If Rcrds Count 1 Then Application MessageboxEX _ Manually select one or more objects from drawing amp VbCrLf amp _ amp Drwg Name amp before running this option Not Ready _ MessageBoxTypeOK OR MessageBoxTypeSystemModal Drwg Open Exit Sub End If Where Clause WHERE Selection I Elself Mode 2 Then Select Case Mode Case 3 Where Clause Where Type I 1 Case 4 Where Clause Where Type I 2 Case 5 290 Where Clause Where Type I 3 Case 6 Where Clause Wher Typ I 1 OR Type 1 2 Case 7 Where Clause Where Type I 1 OR Type I 3 Case 8 Where Clause Where Type I 2 OR Type I 3 End Select End If Qry Text _
137. End Sub Obtain number of generated GUIDs Public ReadOnly Property GuidCount As Integer Implements IGuidGenerator GuidCount Get Return Generated End Get End Property Generate new GUID Public Function NewGuid As String Implements IGuidGenerator NewGuid Generated Generated 1 Return Guid NewGuid ToString End Function 70 End Class Right click the project item not the solution item in the Solution Explorer Select All Configurations as a configuration Navigate to Configuration Properties Build Check Register for COM Interop Click OK Invoke Build Build Solution to build the NET class library and register it as a COM module Start Manifold Create a new script component Set script code to Sub Main Set generator CreateObject Test GuidGenerator Application MessageBox generator NewGuid Application MessageBox generator NewGuid Application MessageBox generator GuidCount End Sub Run the script This should display two GUID strings and then the number 2 Calculate the Distance in Miles from Given Point to All Geoms From adamw manifold net Sent September 19 2006 9 52 AM To manifold l lists directionsmag com Subject RE Manifold 1 Distance calculations http lists directionsmag com discussion read php f 29 amp i 42556 amp t 42556 gt am getting a type Mismatch error on NewPointLatLon when I set up the gt following function in an ActiveColu
138. Import Folder VBscript imports all MID MIF pairs in a folder and sub folders KKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Ask user for starting folder and import it function Main caption Batch Import query name of folder to import folder Application InputBox Enter folder caption if folder length return create file system object and obtain folder fso new ActiveXObject Scripting FileSystemObject fld fso GetFolder folder if fld null Application MessageBox Folder does not exist caption return Import fld KKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Import folder function Import folder var imp Application NewImport MIF imp ImportFormatting true import files with mif extension var files new Enumerator folder Files for files atEnd files moveNext file files item name file Name dotPos name lastIndexOf if dotPos gt 0 ext name substring dotPost l name length toLowerCase if ext mif imp Import file PromptNone import subfolders var folders new Enumerator folder SubFolders for folders atEnd folders moveNext Import folders item KKEKKKKKKKKKKKKKKKKKKKKKKKKKKKK KKK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKAKKKKKKKKKKK 22 NDVI computes Normalized Difference Vegetat
139. Item n select it Gl grab its bounding box Rect property bBox obj Geom Box render to an image p RenderAreaTo Image 100 100 bbox TRUI Gl optionally update the map window make sure it s the active window p Open ication WindowSet ActiveWindow ZoomTo Obj b 216 Setting Map Layer Order by code http forum manifold net Site Thread aspx id 29866 amp ti 632984893201530000 mapLayerSet Add newLayer newLayerPosition The second parameter is not documented in help but working perfectly well and visible in the object browser of VS or VBA Turning Layers On and Off via a Script http www georeference org Forums tabid 7 1 forumid 7 tpage 1 view topic postid 2101 Default aspx 2 105 04 27 2004 8 24 PM You can obtain a specific layer by LayerSet ItemByName Sub Main Set Comps Document ComponentSet Set Comp Comps Map For Each Layer in Comp LayerSet Layer Visible FALSE Application MessageBox Layer Component Name amp is turned off Next End Sub Collect a Map Window Parameter Set CoordSys Width CenterX etc Sub Main Author Lorne Ketch Email LKetch at hfx dot eastlink ca Set WinSet Application WindowSet Set MapWin WinSet Item WT140245 Gordon Map Set Comps Document ComponentSet Set Map Comps Item WT140245 Gordon Map Set Map Comps Item WT140253 Helene Map Set CoordSys Map CoordinateSystem 217 Map Open Set MapW
140. KK KKK ko ko ko ko ko oko ko ck ck ck k k kkk Sub Main Dim Components theComponent Dim I Set Components Application ActiveDocument ComponentSet For I 0 to Components Count 1 Set theComponent Components Item I If theComponent TypeName Image then AssignAMGCoordSysToImage theComponent End If Next End Sub 1 Ck ck ck Ck Ck Sk Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck Ck Ck Ck Sk Ck KKK Ck kk Ck Ck kk Ck kk Ck kk Sk Ck kk Sk ck kk Sk KKK ko kv ko ko ko ko Function AssignAMGCoordSysToImage theImage 103 Dim theCurrentCoordSys Dim CurrentParams Dim theAMGCoordSys Dim toSetParams Set theCurrentCoordSys thelmage CoordinateSystem Set CurrentParams theCurrentCoordSys Parameters Set theAMGCoordSys Application newCoordinateSystem Australia AMG66 55 Set toSetParams theAMGcoordSys Parameters Set the local scale and offset values of the new coordinate system to the existing values prior to setting the current projection toSetParams toSetParams ItemByName localScaleX Value _ currentParams currentParams ItemByName localScaleX Value toSetParams toSetParams ItemByName localScaleY Value _ currentParams currentParams ItemByName localScaleY Value toSetParams toSetParams ItemByName localOffsetX Value _ currentParams currentParams ItemByName localOffsetX Value toSetParams toSetP
141. KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK ko kA ko ko ko Sub Main Assumption All secondary component names will begin with an 8 character identifier beginning with either WO or WT and followed by a 6 digits DDHHMM stamp followed by an underscore ex WT231437 or WO030451 Dim Comp Comps Dim Counter Dim Components2Delete Dim Index LastIndex Dim regEx WO regEX WT Dim Comp Name Dim Answer Answer _ Application MessageBoxEx _ NOTE amp VbCrLf amp VbCrLf amp _ YOU ARE ABOUT TO DELETE ALL COMPONENTS amp VbCrLf amp _ that begin with either WT or WO followd by amp VbCrLf amp _ a 6 digit date time stamp followed by an underscore amp VbCrLf amp VbCrLf amp Example WO272156 ALBERTO LINES amp VbCrLf amp VbCrLf amp DO YOU WANT TO DO THIS YES Warning _ MessageBoxTypeYesNo OR MessageBoxTypeSystemModal OR MessageBoxTypelconWarning If Answer MessageBoxResultNO Then Exit Sub Ed Set regEX WT New Reg regEX WT IgnoreCase regEX WT Global TRUE regEX WT Pattern WTNdNdNdNdNd Md xp TRUE T F C Set regEX WO New Reg regEX WO IgnoreCase regEX WO Global TRUE regEX WO Pattern WO d d d d d d_ I Bl xp TRUI E Set Comps Document ComponentSet We are constantly deleting components so we have to be careful Deleting one compone
142. List layerItem Highway Labels layerList layerItem City Labels layerChck parameter layer layerSqno off else if layerList layerItem Eastern NC Counties layerList layerItem Extra jelse layerChck parameter layer layerSqno layerDefv if layerChck layerChck checked layersC layersC lt input id layer layerSqno name layer layerSqno SN layerChck type checkbox gt encode layerList layerItem Mn Yep it is working However i have 30 different map projects on my IMS which means a lot of hardcoding layers BTW I had to do the same thing for dropdown menus too 176 Thanks You could store the names of layers which should be shown by default in a separate comments component within each MAP file This way you would be able to use the exact same ASP code on each of your web sites Set Layer to Layer Off http 69 17 46 171 Site Thread aspx id 16433 amp ti 6326773024 10000000 how would you set a layers visibility off in an ASP page using javascript In had the layer visibilty off in my map file but the layers are still on after I reload my map wow it was easier than i thought i put this code right before create results section and it works like a charm if command layers mapserver turnlayer 1 false mapserver turnlayer 2 false now the only problem is the check boxes
143. Main Set exporter Application NewExport ECW Set components Application ActiveDocument ComponentSet For i 0 to components Count 1 Set theComponent components i If theComponent typeName Image Then exporter CompressionRatio 10 exporter Export theComponent theComponent Name ecw PromptNone End If Next End Sub Exporting Geometry as SHP MetaData From James Burn Sent Thursday March 02 2006 9 49 PM To zjmcypan pty com Manifold List Subject Re Manifold 1 Spam Metadata http lists directionsmag com discussion read php f 29 amp i 41732 amp t 41726 You can export the geometry as shp files do a search on the forum and you ll find a metadata script and you just need to export the proper XML file for the metadata right If you search the Manifold forum you ll find a script from Bob Heitzman for creating metadata Cheers James Burn BSc GIS pg AScT Option Explicit MetaReport20021013 Please report any problems to rheitzman hotmail com Produces and XML file that includes the mandatory FGDC Metadata Most of the static fields have been set to ToDo You can edit those in the script below to insert your static information or use a text editor afterwards to update the information I included the place elements as they are very common although not mandatory I inserted the bulk of the projection information in the abstract element as it is not mandatory b
144. Manifold Script NET XML Examples http forum manifold net Site Garifold net http 69 17 46 171 Site http www manifold net Archive Site http www georeference org Default aspx lt lt Directions Magazine Mapinfo L Discussions http ists directionsmag com discussion list php f 29 Postings to GeoReference 1 Feb 2 2007 2 READ ME please For the most part the Manifold script examples in this document were extracted from GeoReference and Manifold L archives or came from Manifold s Free Stuff Page http www manifold net products freestuff html An effort was made to provide links back to the original submissions and author information However the document was developed exclusively for my own training purposes and this combined with the large size makes it possible that some citations may have been missed PLEASE contact me if you feel that you were not properly referenced for your work I will add your name to the example or cut the code from the document at your discretion and promptly update the file on GeoReference I have also included some of my own work In some cases I have clearly taken examples provided on GeoReference and modified them if that is the case I have tried to indicate where the idea came from and provide links back to the original work Again the document is large and I have probably missed some references PLEASE contact me if you have an
145. Map zip 85 MapViewer zip http forum manifold net Attachments 52 27527 ManifoldViewer zip adamw on 12 15 2006 7 58 AM 32260 Well are you looking to create a web site or an application If you are looking to create a web site you would do good by examining the web site examples on the Free Stuff page None of these examples is in VB NET which is unfortunate but the VB NET code would be pretty similar and if you are into web applications you d better learn JavaScript for all that AJAX stuff anyway Loading and Compiling the MapViewer Project Converting to VB2005 http forum manifold net Site Thread aspx id 33473 trondwe on 1 16 2007 3 11 AM 33520 REFERENCE http 69 17 46 171 Site Thread aspx id 27477 i First I upgraded the ManifoldViewer project from VS2003 to VS2005 using the inbuild wizard in Visual Studio ii Deleted the old reference to Manifold and added reference to the 7x library Still did not work could not see the FormMain dialog in the designer just obscure messages iii Deleted the old reference to ActiveX Manifold control and added it again to the Toolbox still problems iv Added a new form and added the 7x Manifold control to that form v Deleted the new form Now I could see FormMain in the designer Then I had to alter the sourcecode Fully qualify DialogResult Ok Alter method ctIRefresh to Refresh for the Manifold control three places Now I could start the
146. MessageBoxTypeIconError OR MessageBoxTypeOk Err Clear On Error GoTo O0 Table Column Exists False Exit Function End If If Source Col Type lt gt Column Type Then 315 Application MessageBoxEX Table amp VbTab amp Table Name amp VbCrl Lf Column amp VbTab amp Column Name amp VbCr Column Type amp VbTab amp Source Col TypeName ERROR Incorrect Column Type Routine Table Col umn MessageBoxTypeIcon Exit Function End If End Function GEXISUSYT S Error OR MessageBoxTypeOk Table Column Exists False Lf amp amp amp VbCrLf amp VbOTLE amp Ck CK ck ck Ck Ck Ck Ck Ck CC Ck Ck Ck SC Ck Ck Ck Ck Ck Ck Kk Ck Ck Sk Ck kk Ck ck kk Ck kk Ck ck kk Ck kk ko Sk Sk Sk ko ko kv ko ko ko ko ko ko 316 XML Custom Styles etc Defining Custom Label Styles Points and Areas can be done as well ManifoldO L Date 01 13 2006 08 18 http lists directionsmag com discussion read php f 29 amp i1 41329 amp t 41325 gt I would like to be able to edit a style that draws labels in a box I would like to control the width gt of the box because building a map with a high density of labels Is there any way of doing this Yes with a custom label style eg xml style lt name gt MyLabel lt name gt lt type gt label lt type gt lt code gt rectangle xmin 2000 ymin 1000 xmax 2000 ym
147. NAME enne ener enne nre n rre n nennen nnns 241 PASTE AS COMPONENT TYPE RETURNS NEW COMPONENT INDEX enne enne 242 DUPLIGATE A COMPONENT tenta irte telae re Hx edo diae ean bie d ede ento sed tenet test 244 CLOSE A WINDOW 2 eite tette sitetelte dr Hec UR Ned OE HR EE cte p dcr pontus eb Bede eee iy tdt 249 RETRIEVE ALL COMPONENT NAMES eed coe e tiro S rg eit et Fee ek deed ROME renal ne EDI Redes ences tnt 249 RETRIEVE OPEN WINDOW INDEXES AND NAMES INTO DYNAMIC ARRAY cssccssecsseeseeeseeeeeeeeeeeeeseenseenseenseenseenaes 250 CLOSE AWINDOYW oineta aa a OP Ero m o utet Mie dee UNSELECT ALL PROJECT COMPONENTS TYPICALLY USED IN MAPS IMPORT COMPONENTS FROM OTHER PROJECTS nenei aieri n eene enne ennt tentent entes einst ta se etas E see tns entes en MERGE GEOBASE DEM TIEES 8t E ERR AH EO TREE DE Eb deed Ce ite be nb Reet eee iy te USING REGUEAR EXPRESSIONS 10 2 e etre ec EUER d ERI UR GERA eed CRUS Tenn cce tok Beet che regent GET THE LAST TOKEN IN A STRING IN PROPER CASE cesses nne erre n rennen enne BUBBLESORT TEXT BASED ON UPPER CASE TEXT EVALUATION eene nre enne en nennen FIND THE NUMBER OF DAYS IN ANY MONTH INCLUDING FEB LEAP YEARS ssescessesceseeeeeseceteeeeneeeeceaeeeeeaeeaees 259 IS YEAR AsEAPAY BARS a oem ati eius ona optem ii ets 260 USING SENDKEYS TO LOAD DIALOGS ccccccccscessessscecececeenesncceceeececsesaaeseecceceeaueceeececeesesasceeeesesensasaeeeeeesenenseaeees 261 YOU CANNOT INSTANTIATE
148. Name Column Names Table Name WxStns Redim Column Names 4 Column Names 0 Column Names Column Names Column Names Column Names 1 2 3 4 Chr 9 for TAB Create Delimited Table Table Name Column Names fixed width FALSE TRUE End Sub Prov State ID ICAO Syno Num Lat Dec Long Dec I Yo Ck ck ck ck ck ck C ck Sk Ck Ck ck Ck kk Ck Ck 0k Ck Ck Ck ck kk ck ck ck ck ck ck kk ck ck ck kk ck kk ck ko Sk ck Sk Sk kv Mk ko ko ko ko kokok Sub Create Delimited Table _ ByRef Source Table Name ByRef Column Names ByRef Separator ByRef Quotes _ ByRef Include ColumnNames Author Lorne Ketch NOTE Idea stems from MIKE SUMNER S example found at the URL below Many options added 230 http www georeference org Forums tabid 71 forumid 4 tpage 1 view topic postid 12575 Default aspx 12599 Dim Dim Dim Dim Source Table Name The table name from which records will be extracted via a Query Column Names An array that contains the column names to be used in the Query Separator Single character used to separate the column values in the formatted text written to comment component Formatted Records Examples of values passed to the function Yo space separated values m CSV Chr 9 tab delimited values un bs bar separated values Fixed Width All entries in a column have the same width Each column
149. None ChartDataShowTypes ChartFormat ChartFormatInterpolate ChartFormatLoad ChartFormatLoadFromFile ChartFormatReverse ChartFormatSaveToFile ChartLabels ChartLogarithmic DrawingColor DrawingDissolve DrawingDistricts DrawingDistrictsAdvanced DrawingDistricts Visual DrawingDistricts VisualAdd DrawingDistricts VisualClear DrawingDistricts VisualClearAll DrawingDistricts VisualDelete DrawingDistricts VisualFill DrawingDistricts VisualMoveDown DrawingDistricts VisualMoveToBottom DrawingDistricts VisualMoveToTop DrawingDistricts VisualMoveUp DrawingDistricts VisualShowCounts DrawingDistricts VisualShowValuePercentages DrawingDistricts VisualShow Values DrawingDriveTimeZones DrawingMinicharts DrawingMinichartsMoveDown DrawingMinichartsMoveToBottom DrawingMinichartsMoveToTop DrawingMinichartsMoveUp DrawingMinichartsSelectAll DrawingMinichartsSelectInverse DrawingMinichartsSelectNone DrawingMinichartsShowTypes DrawingObjectBranchDelete DrawingObjectBranchDuplicate DrawingObjectBranchSnap DrawingObjectBranchSplit DrawingObjectCenter DrawingObjectColumns DrawingObjectColumnsClear DrawingObjectColumnsPrint DrawingObjectColumnsShowBlanks DrawingObjectColumnsShowIntrinsics DrawingObjectColumnsShowReadOnly DrawingObjectColumnsShowTypes DrawingObjectCoordinateAdd DrawingObjectCoordinateAddMidSegment DrawingObjectCoordinateAddOnSegment DrawingObjectCoordinateDelete DrawingObjectCoordinateDeleteSplitBranch DrawingObjectCoordinateDu
150. O VB2005 ccccscccccceceesssssceeceeeeenerseeeees 86 TX COM REGISTRY PROBLEM e hene irte ee eese a Bae ai HE ERES 87 Iioc iiy dard 88 USING THE VBA PROGRAMMING ENVIRONMENT csccccccecsessssececececesceseeeseeececeesnssesecececsesesseeeeeeesesesaeaeeeeseseneseaaees 88 CREATE A MAP PROJECT FILE AND DRAWING THROUGH COM OR NET esee nnne 95 CREATING A VIEW WITH A SPECIFIC SCALE ccsssssccccececsessececececsessnsececececeessnsaaececcesenesnaeceeccsesensaaeaeeeceesensnaeaeees 96 CANCELLING THE PROGRESSBAR OBJECT FROM VB NET cccccccccccsssessscececececcesssseceeccecsesssaeeeeceeceeseeseseeeeeeeenenssaeees 98 PROGRAMMING AN ADD IN TOOLBAR DLL IN VB NET esee enne eene ener nn nennen nennen ens 99 HOW TO CREATE A COMPONENT VIEW AT THE DESIRED SCALE VIA VB NET eese enne 99 BUIELD A FORM VIA VB NET CODE E E E eie eee cone eei epe tee ae teet e e UR E co beer vereor e let eet du vade bees 101 COORDINATE SYSTEM MANIPULATION ee eene ee ee enne een tn seen nose toa e seta tn sese eaae eese ense see en sese ease eese ense eS 103 SETTING CURRENT PROJECTION OF IMAGES essen n enne eene nenne tnn art s enne tren ases serene rena n snae ener na 103 APPLY A NEW PROJECTION TO AN EXISTING DRAWINQG ccceeeeeeeeeeene nen eene en enhn ne ennt nete nnns esee netten nennen ener e 104 CHANGE PROJECTIONS TO LAT LONG NO OFFSETS cc
151. OPTIONS CoordSys amp Drwg Name amp AS COMPONENT amp VbCrLf amp _ SELECT ID Cast Type I as Text As Object Type amp VbCrLf amp _ CentroidX P as X CentroidY P as Y amp VbCrLf amp _ FROM amp Drwg Name amp amp VbCrLf amp _ Where Clause amp SPLIT BY Coords ID AS P Ory RunEX TRUE Set Rcrds Qry Table RecordSet If Rcrds Count 1 Then Application Messagebox Drwg Name amp No Objects were Selected Exit Sub End If Qry Table Open Ory Open Drwg SelectNone End Sub 1 Ckokckck ck kk Ck Ck Ck Ck CK Ck Ck Ck Ck CC Ck Ck Ck Kk Ck Ck Ck Ck Ck Ck kk Ck Ck Ck Ck kk Ck Ck Ck Ck kk Ck ck kk Ck kk ko Sk kk Sk Kk kv ko ko 9k ko ko Private Function Component Exists ByVal ComponentName Dim Component Index Dim Comps Author Lorne Ketch Permission to use modify and distribute this code is granted provided that you cite the original author Email Ketch at hfx dot eastlink ca Set Comps Document ComponentSet Component Index Comps ItemByName ComponentName If Component Index lt 0 Then Component Exists False Else Component Exists True End If End Function VK KKK ck ck ck ck ck kk Ck CK Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Sk Ck ck kk Ck kk Sk ck Sk Ck kk ko ck kk Sk ko kv ko ko k A ko ko 291 Extract Object Coordinates via Object Model Code below is Not Form driven F
152. Pt X CDb1 Location 0 Pt Y CDb1 Location 1 Pts Add Pt Next Brs Add Pts create object If ObjType 1 Then Drawing ObjectSet Add Application NewGeom GeomPoint ElseIf ObjType 2 Then Drawing ObjectSet Add Application NewGeom GeomLine ElseIf ObjType 3 Then Drawing ObjectSet Add Application NewGeom GeomArea End if Loop close file Stream Close open imported drawing Drawing Open Else Application MessageBox File not found End if End Sub Import Text File Imports file produced by Export Text File solver to a new drawing Sub Main ask for filename FileName InputBox File name Input Set FSO CreateObject Scripting FileSystemObject Brs Brs Brs 53 If FSO FileExists FileName Then open file Set Stream FSO OpenTextFile FileName 1 create new drawing Set Drawing Application ActiveDocument NewDrawing Release45 Text read entire fil Do While Stream AtEndOfStream True read object type and number of branches ObjType Do While Stream AtEndOfStream lt gt True AND ObjType ObjType Stream ReadLin Loop If Stream AtEndOfStream Then Exit Do If ObjType Point Then BrsCount 1 Else BrsCount CInt Stream ReadLine End If read or synthesize branches Set Brs Application NewBranchSet For 1 0 to BrsCount 1 If ObjType Point Then PtsCount 1 Else
153. Second 272 TableTransformIncreaseWeek TableTransformIncreaseY ear TableTransformInvert TableTransformLeaveContaining TableTransformLeaveContainingMatch TableTransformLeaveContainingToken TableTransformLeaveEnding TableTransformLeaveEndingWithMatch TableTransformLeaveEndingWithToken TableTransformLeaveLeft TableTransformLeaveMatching TableTransformLeaveRight TableTransformLeaveSounding TableTransformLeaveStarting TableTransformLeaveStarting WithMatch TableTransformLeaveStartingWithToken TableTransformLogarithm TableTransformLogarithmBinary TableTransformLogarithmDecimal TableTransformLogarithmNatural TableTransformLogicalAnd TableTransformLogicalNot TableTransformLogicalOr TableTransformLogicalXor TableTransformMakeAbsolute TableTransformMakeAtLeast TableTransformMakeAtMost TableTransformMakeLowerCase TableTransformMakeSentenceCase TableTransformMakeTitleCase TableTransformMakeUpperCase TableTransformModulo TableTransformMultiply TableTransformNegate TableTransformPower TableTransformPrepend TableTransformReverse TableTransformReverseByTokens TableTransformReverseToken TableTransformRound TableTransformRoundDown TableTransformRoundUp TableTransformSine TableTransformSpanExcluding TableTransformSpanIncluding TableTransformSquare TableTransformSquareRoot TableTransformSubtract TableTransformTangent TableTransformToggleCase TableTransformTrim TableTransformTrimLeft TableTransformTrimRight TableUnlink TableValueAdd Tab
154. Selections Not Allowed FALSE End If Set Comps Document ComponentSet If Els create temporary query componen zl CT Component Exists Query FALSE Then Set Ory Document NewQuery Query e 246 VbCrLf amp Set Qry Comps Item Query End If Count BeforePaste Comps Count ReDim IDs BeforePaste Count BeforePaste 1 Index 0 For Each Comp in Comps IDs BeforePaste Index Comp ID Index Index 1 Next If Selections Not Allowed Then Original Comp Copy Elself Duplicate Selection Then Y Is there a selection If not we are done Ory Text Select From amp Original Comp Name amp Where Selection I Ory RunEx TRUE Set Rcrds Qry Table RecordSet If Rcrds Count 0 Then Application MessageboxEX You are attempting to create a new amp uCase Original Comp TypeName amp by Pasting SELECTED objects from amp Original Comp Name amp amp VbCrLf However no objects are currently selected amp VbCrLf amp VbCrLf amp _ Function Duplicate Component No Selected Records MessageBoxTypeOK OR MessageBoxTypeSystemModal Exit Function End If Original Comp Copy TRUE Copy the Selection Else Original Comp Copy FALSE Copy the entire Drawing End If Err Clear On Error Resume Next Document PasteAs Original Comp Type If Err Then Err Clear Exit Function End I
155. Source Col IsIntrinsic and _ NOT Source Col Identity and _ NOT Source Col Type ColumnTypeGeom Then Set New Column New ColumnSet NewColumn Intrinsics and ID should not be in the table but just in case New Column Name Source Col Name New Column Type Source Col Type New Column Size Source Col Size New ColumnSet Add New Column Assemble a Column List for the INSERT INTO Query If Index Last Index Then Column List Column List amp amp Source Col Name amp Else Column List Column List amp amp Source Col Name amp End If End If Next Set Ory Comps Item Query Ory Text INSERT INTO amp New Table Name amp Geom I amp Column List amp SELECT amp Geom ColumnName amp amp Column List amp _ FROM amp SourceGeom TableName amp Ory RunEX TRUE 313 New Drawing CoordinateSystemVerified TRU GI End Sub KKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Private Function Extract CoordSys From Geom _ ByRef SourceGeom TableName ByRef Geom ColumnName Author Lorne Ketch Email Ketch at hfx 1st dot eastlink 2nd dot ca Extracts the CoordSys from the First Record in the source geometry table NOTE http forum manifold net Site Thread aspx id 25835 adamw on 8 14 2006 6 19 AM 425878 Writing to the Geom I field of a
156. Sub End If Set surface window Component Set pixels surface PixelSet input a pair of values heightl app InputBox Value 1 Select Band If heightl Then Exit Sub End If height2 app InputBox Value 2 Select Band 33 If height2 Then Exit Sub End If If CDbl heightl lt CDbl height2 Then heightLow CDbl heightl heightHgh CDbl height2 Else heightLow CDbl height2 heightHgh CDbl height1 End If app StatusText Selecting pixels turn batch updates on app ActiveDocument BatchUpdates True select pixels For i 0 To pixels Count 1 If i Mod 100 99 Then app StatusText Selecting pixels amp CStr i 1 amp of amp CStr pixels Count 1 amp End If Set pixel pixels i If Not pixel IsMissing Then If pixel Value heightLow And pixel Value heightHgh Then pixel Mask pixel Mask Or 1 Else pixel Mask pixel Mask And Not 1 End If End If Nex turn batch updates off app ActiveDocument BatchUpdates False app StatusText Done End Sub Select Lower Part Sub Main Set app Application locate opened window and ensure it displays surface Set window app WindowSet ActiveWindow Set component window Component If window Component Type lt gt ComponentSurface Then Application MessageBox No surface Exit Sub End If Set surface window Component Set pixels
157. T EXTERNAL IMAGES USING DRAWING INDEX ccccsesssseeececeesssceccecceceenssaeceeececsesesusceeeceeseneaseeeeesesenensaaeees 153 EXPORT TO MANIFOLD PROJECTS INTERNAL DRAWING TILES USING DRAWING INDEX eere 154 EXPORT A SURFACE STRAIGHT TO IMAGE FORMAT cccceesesscceeececsesssseceecceceeaueceeececeesauececececsenesaseeeeesesenenaaeees 156 EXPORTING SURFACES AS IMAGES eerte te eee reto ovde e dee eo ee ee vehe pee d eve ela ee e Pe EE e ei deae va 156 EXPORTING ALL IMAGES IN A PROJECT cccccccccssssssscecececeessnsscecececsesssnaececccscsesaaeeesecscsessaaeaeeccsesensaaeaeeeceesensaeaeees 157 EXPORTING GEOMETRY AS SHP METADATA ccsesssscceceesesssceceecesceesssseceeececeenssusceeececcesesueceeecseseseaseeeeeseseneesaeees 157 EXPORT SURFACE PIXELS GREATER THAN 0 TO XYZ TEXT FILE FILESYSTEMOBJECT ceesseeseeseeeseeeteeeeenees 165 GENERIC EXPORTER aere ra tee terio tre eas seo cbs ea eie eate aie t tecce e E e T E WLS 166 GENERATE AND EXPORT TILE IMAGES esee T ener eset ettet enses sees ee tete a ness eerie tete anna ses ente te nane 168 EXPORT TABLE TOMS EXGBEL oerte t ere thee e E e c T pe T eve e Bo Pe EE epe TEE vete 170 EXPORET TOME rio eter eec o tent ce En Avis TIE ivit fuite n a tis dettes 171 Ip Cen 173 IMS SELECTIONS FROM QUERIES NOT BEING UPDATED REFRESHED eren eene enne 173 MANIPULATING IMS LAYERS VIA CODE eese e eren nnnt eene entr th anas sees entr
158. TION INDEX EXAMPLE OF USING THE APPLICATION STATUS lg M 23 QUARTILES ASSIGNS VALUES IN THE GIVEN NUMERIC COLUMN TO QUARTILES eeeeeeeeenne eene enn 24 RANDOM POINTS CREATES A DRAWING WITH POINTS RANDOMLY TAKEN FROM DATA TABLE eeeeee 25 SEQUENTIAL LINES JOINS POINTS SELECTED WITHIN THE ACTIVE DRAWING WINDOW WITH A LINE 27 SPATIAL OPERATIONS CREATE A CIRCLE AROUND EACH CITY cceseeeeeeeenenne enne nennen trennen nren reete etre 28 Create a Circle Around Each Cily ea anota noD REC ERU YO OI MEDICI EUER 28 Iranse fer County Name to Each City uiae doti cere ve ens Id Or HERE MIH ET GEGEN E S EN ASEE ENESES 30 Transfer Country Name to Each City using Query sse eene ener 32 SURFACES COMPUTES AVERAGE HEIGHT AND SELECTS PIXELS BELOW THIS HEIGHT eene 33 Select BONG 33 Select Lower POPs iusserat cepe va a De aa WR TO RRO 34 AY ITA CE a EEEN 35 TABLE GENERIC SELECTS ALL RECORDS WITH VALUE IN AN ACTIVE COLUMN EQUAL TO THAT IN THE ACTIVE CELL Em 38 Select Same Year Month to Active ccccccccccccccsscccssccssscecssecsseceeseecsseceeseecsseeeessecseeeessecsseesesseceseesesseceeeeesseceseeeeseees 38 Select Same To ACTIVE sos ied dose sees ren y eie ret e ee bet Cars pre RR ERROR 38 TABLE NWIND ADDS A RELATION BETWEEN
159. TION TO TABLE COLUMNS cscssssssccecsessssecececeesenerseaeees 122 IMAGES SURFACES AND TERRAINS eere eee eerte neon nose tn oeste enses eoa eee ee enne eee en eese eaae eese ease eee en esee eaae 127 TERRAIN ELY S THROUGH 4 A rere eo n e Kis pt eise rete itai esee Pareto e E er gene es 127 TERRAIN FLY THROUGH SAVE THE X Y AND Z FLIGHT COORDINATES esee eene ener rennen 133 SURFACE ANALYSIS SCRIPT SLOPE ORIENTATION VERTICAL amp HORIZONTAL CURVATURE CALCULATION 135 EXTRACTING A SURFACE HEIGHT AT A GIVEN LATITUDE LONGITUDE cccccccessssceceesseceessececeesseeeceesseeecnsseeeeees 140 BATCH TRANSFORM IMAGE GAMMA ccssscssccecsesssssceeececeeseecececececsensaececececeessaaeceeececeessauecececeesensaaeeeeeeeeseneneaeees 142 SOM AIT SURFACES NA BROJECT secet a nere e EU cake ee e e PCR o Gal URINE wa eae Dame Pec E PE ORE VER vu a Dostana bes 143 EXTRACT THE SURFACE HEIGHT FOR EACH POINT IN DRAWING cccccscscceceessssececececeesenececececsensaseeeeeseeenenseaeees 143 CALCULATING HILLSHADE FROM A DEM ee ee ee ee eee enne en nose e tos e seta tn sese tone sese enne eese ense sete sese seen aee S 145 IMPORT EXPORT it eeceeieveut exec t eouo co edd egeo evo aieo tone Pus cedeyue pute to esie even be oes ees tiroe tioata oise be ito eE 146 IMPORT SURFACES SET SURFACE PROJECTIONS THEN MERGE TO ONE SURFACE cccsesssceeececeesssseceeceeceesenseaeees 146 IMPOR
160. Then Application MessageBox No objects in Cities Exit Sub End If obtain owned table and set of table records Set table drawing OwnedTable Set records table RecordSet ensure table contains radius column radiusIndex table ColumnSet ItemByName Radius km If radiusIndex lt 0 Then Application MessageBox No Radius km column Exit Sub End If 28 Pi 3 141592653589793 Dim pointIDs ReDim pointIDs objects Count 1 pointCount 0 cache IDs of point objects For objectIndex 0 To objects Count 1 Set object objects objectIndex If object Type ObjectPoint Then pointIDs pointCount object ID pointCount pointCount 1 End If Next If pointCount 0 Then in Cities Application MessageBox No points Exit Sub End If create circle for each point object For pointIndex 0 To pointCount 1 lt lt lt batch updates here if the number of cities is too large Set object objects objects ItemByID pointIDs pointIndex Set record records records ItemByID pointIDs pointIndex obtain city location Dim location Set location object Geom Center obtain radius of circle from table radius 1000 CDbl record Data Radius km create circle Set pointSet Application NewPointSet For i 0 To 31 Set point Application NewPoint calculate angle angle i 2 Pi 32 obtain point of circle point X location X radi
161. To manifold l g lists directionsmag com Sent Tue 05 23 2006 10 18 AM Subject RE Manifold l Problem Selected Records Count http lists directionsmag com discussion read php f 29 amp i 42207 amp t 42207 gt Open Drawing and select one or more objects Run the gt script The first time I run the script the correct number of gt selected records is returned Select a different number of objects in gt gt Drawing and run the script again I am finding that I get the same number as the first run This happens because the query caches the results of the previous execution To force the query to recompute the results use Query RunEx Query Text Select From Drawing where Selection 1 Query RunEx True Set Table Query Table Adam Wachowski 236 Cannot Link a Query Programmatically http 69 17 46 171 Site Thread aspx id 22 181 amp ti 63285 1747952570000 Hi In manifold application we can import a drawing from query of the same project How can we do that programmatically Kuldeep There is no easy way to do this programmatically although you obviously can create a script which would run the query loop through the resulting records and create a drawing object for each record You cannot programmatically link a drawing send in a request what you can do is create a new drawing and modify your SQL to be an INSERT and use that to populate the new drawing with the result data this is
162. WINGS g AS WELL AS PROJECTED DRAWINGS o Dis THE CALCULATED SPEEDS ARE WITHIN 0 1 KNOTS tomatically use default ellipsoid calculations nprojected drawings G OF THE VALUES DERIVED FROM Mapinfo Mapinfo appears u u 1 kkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkkxkxkxkxkxkxkxkxkxkxkkkxkxxkxx Sub Main Form Visible True End Sub 1 kkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkkxkxkxkxkxkxkxkxkxkxkkkxkxxkxx Sub cmd Proceed Click Update SysSpd via Objects End Sub 220 VK KKKKKKKKKKKKKKKKKKKKKKKKK KK KK KK KK KK KK KK KKK KKK KKK KK Kk Kk ko ko ko ko ko ko ko ko Sub cmd Close Click Form Visible False End Sub VK KKKKKKKKKKKKKKKKKKKKKKKKK KK KK KK KK KK KK KK KKK KKK KKK KK ko ko ko ko ko ko k ko kk Sub Update SysSpd via _ Objects Dim Document Components Component Dim Owned Table Dim Obj Objs Dim Length nm Speed Dim ObjID RecordID Dim Record Records RecordCount Set Document Application ActiveDocument Set Components Document ComponentSet Components Component Index Set Component Components Component Index OR Set Component Components Components Set Owned Table Component OwnedTable Set Records Owned Table RecordSet RecordCount Record
163. Wingdings 163 Wingdings 164 Wingdings 165 Wingdings 166 Wingdings 167 Wingdings 168 Wingdings 169 Wingdings 170 Wingdings 171 Wingdings 172 Wingdings 173 Wingdings 174 Wingdings 175 Wingdings 176 Wingdings 177 Wingdings 178 Wingdings 179 Wingdings 180 Wingdings 181 Wingdings 182 Wingdings 183 Wingdings 184 Wingdings 185 Wingdings 186 Wingdings 187 Wingdings 188 Wingdings 189 281 Wingdings 190 Wingdings 191 Wingdings 192 Wingdings 193 Wingdings 194 Wingdings 195 Wingdings 196 Wingdings 197 Wingdings 198 Wingdings 199 Wingdings 200 Wingdings 201 Wingdings 202 Wingdings 203 Wingdings 204 Wingdings 205 Wingdings 206 Wingdings 207 Wingdings 208 Wingdings 209 Wingdings 210 Wingdings 211 Wingdings 212 Wingdings 213 Wingdings 214 Wingdings 215 Wingdings 216 Wingdings 217 Wingdings 218 Wingdings 219 Wingdings 220 Wingdings 221 Wingdings 222 Wingdings 223 Wingdings 224 Wingdings 225 Wingdings 226 Wingdings 227 Wingdings 228 Wingdings 229 Wingdings 230 Wingdings 231 Wingdings 232 Wingdings 233 Wingdings 234 Wingdings 235 Table Label styles Aug 12 2006 box boxB boxCorners boxFrame boxGradHorzDD boxGradHorzDL boxGradHorzLD boxGradHorzLL boxGradVertDD boxGradVertDL boxGradVertLD boxGradVertLL boxInner boxL boxR boxT boxThick boxThickB boxThickL boxThickR boxThickT halo haloLB haloLT haloRB haloRT haloWide plain roadShield roadShieldBlack roadShieldSmall
164. a Drawing to the Query Unlink and you re done VBScript Sub Main KlausDE at 4 9 2006 2 02 AM 420327 Let me add a warning I m not sure if this query will use Precision to check for identical Geoms I e if you have created duplicates by means involving any mathematical process like projecting the objects will probably appear different adamw at 4 10 2006 7 07 AM 420351 It won t The comparison of the geoms will be exact DrwngTNm Drawing Table SET doc Application ActiveDocument SET comps doc ComponentSet SET DrwngTbl comps DrwngTNm SET Clmns DrwngTbl ColumnSet Start building the SOL string Text SELECT DISTINCTROW Geom ID AS Gm FOR EACH Clmn IN Clmns 303 Add the columns to the SQL string Line below was Klaus original If NOT Right Clmn Name 3 2 I OR Clmn Name ID then Line below was suggested by Adam as a more robust alternative If Not clmn IsIntrinsic And Not clmn Identity Then Text Text Clmn Name end if NEXT Finish the SQL string Text Text FROM DrwngTNm Set qr doc NewQuery SelectUnique DrwngTNm FALSI qr Text Text GI Application MessageBox done Script End Sub Klaus You might want to modify the condition in the line filtering the intrinsic columns and the ID column to VBScript If Not clmn IsIntrinsic And Not clmn Identity Then Thi
165. aeeeeeeeenensea 301 ACCESS COLUMN DATA BY INDEX RATHER THAN COLUMN NAME scsessssesceecsesessececeeecsesenseseeeesceesesssaeeeeeesenenees 302 FINDING AND DELETING DUPLICATE RECORDS BASED UPON COLUMN CONTENTS sssssssseececsesesseceeeeeesenenseaeees 303 SAVE DRAWING NAMES TO A COLUMN cssesssssseeecsessnsececececsenesececececseneececeeeceenesaseeeeecsenesnaaeeeeeesesenssaeeeecesenenees 304 RETURN THE IDENTITY COLUMN NAME oreeitet del eee eek eee e ee ER ceeded eR e de Fe o E ERE EET EUR TAE VE e kr Yee ea EE Renova 307 COLLECT COLLUMN NAMES ALL REGULAR INTRINSICS ONLY ETC isses nennen enne 308 TRIM ALL TEXT COLUMNS IN A TABLE iecit ren cogs ee rede IE CR UI EC TOT edenda 311 CREATE A DRAWING FROM A TABLE THAT CONTAINS A MANIFOLD GEOMETRY COLUMN ecce 312 XML CUSTOM STYLES ETC eere eese vo eer aa e Vaene eena ShKAS ue E ee raU REES Eee n MR RE E Nee PAKES NN or doabuvassvenestoensbos 317 DEFINING CUSTOM LABEL STYLES POINTS AND AREAS CAN BE DONE AS WELL eee eee 317 Line River Bank su oe dt eee eo bte ten aite edito e etatis taedis 318 Point Hourelass 222 1 nap qe di eto aeg dde node o op oed Mares bt din 318 EXAMPLE EQUAL INTERVAL THEME sssccscccscessevscceccsecsceensconcescescesnscneescecsceessensenscescessesncenccesceseessccuscsecscesneceueeses 319 ADDNGA TRUETYPE EONT SYMBOL sette eie tette e E ERO ar ERE e e e EE D TAE PES 320 XML SCHEMA CANNOT BE USED TO VALIDATE A FILE c
166. ame Drawing Then set Objects Component ObjectSet s s amp number of objects amp CStr Objects Count amp vbCrLf set geom Objects GeomSet set rect geom EnclosingRect s s amp spdom bounding amp vbCrLf 163 s s amp WestBC amp FormatNumber rect Box XMin params params ItemByName localScaleX value LatLongDigits 0 0 0 amp vbCrLf S s amp EastBC amp FormatNumber rect Box XMax params params ItemByName localScaleX value LatLongDigits 0 0 0 amp vbCrLf s s amp NorthBC amp FormatNumber rect Box YMax params params ItemByName localScaleY value LatLongDigits 0 0 0 amp vbCrLf s s amp SouthBC amp FormatNumber rect Box YMin params params ItemByName localScaleY value LatLongDigits 0 0 0 amp vbCrLf End If s s amp Coordinate System amp System Preset amp vbCrLf s s amp Datum amp System datum name amp vbCrLf For i 0 To params count 1 With params i Select Case name supress select params print others Case majorAxis eccentricity centerX centerY centerZz ignore these cause I don t have a clue as to what they do Case scaleX localScaleX scaleY localScaleY falseEasting localOffsetX falseNorthing localOffsetY these are handled with direct calls latter Case Else all un accounted for params display
167. an t figure out from the reference section of the user manual how this can done Is there a focus which determines where the new component is put How can the focus be moved around Thanks P1000 Here s a workaround in VBScript Sub Main Set doc Application ActiveDocument Set table doc NewTable MEMORY False Table Folder Nothing Copy a Component from another MAP File http 69 17 46 171 Site Thread aspx id 1048 amp ti 632 109909000000000 mdsumner 2004 01 27 3 56 PM formatting is not preserved for me when I do it in a script it s fine with GUI copy paste either from a saved document or the active document 223 That s because what you do in GUI is probably not what you do in a script in that in GUI you paste to the Project pane but in script you paste to the drawing window Try pasting with Document Paste Sub Main copy component from foreign project Set doc Application NewDocument C Temp Test map true Set comps doc ComponentSet Set comp comps Drawing comp Copy False copy component paste component to active project Set thisDoc Application ActiveDocument thisDoc Paste paste component End Sub Applying Thematic Legends http 69 17 46 171 Site Thread aspx 1d 18864 amp ti 632751756750600000 njengler at 2 10 2006 1 41 PM 18938 In order to apply thematic legends in your case Equal Count colouring you must use SetUniqueValues or one of the other
168. anches Count 1 Then Exit Sub End If reject objects with less than three points Set pointsOrg branches 0 PointSet If pointsOrg Count 2 Then Exit Sub End If compose intermediate point set from original point set duplicating first and last points Set pointsInt Application NewPointSet Set point Application NewPoint point X pointsOrg 1 X point Y pointsOrg 1 Y pointsInt Add point For index 0 to pointsOrg Count 1 Set point Application NewPoint point X pointsOrg index X point Y pointsOrg index Y pointsInt Add point Next Set poin point point pointsIn X Y compos Set poin Set poin point point X Y t Application NewPoint pointsOrg pointsOrg Count 2 X pointsOrg pointsOrg Count 2 Y t Add point tsFin Application NewPointSet t Application NewPoint pointsInt 1 X pointsInt 1 Y pointsFin Add point For index 1 to pointsOrg Count 1 Set pointA pointsInt index 1 Set pointB pointsInt index Set pointC pointsInt index 1 Set pointD pointsInt index 2 dx pointB X dy pointB Y cx pointB X pointA X cy pointB Y pointA Y If index 1 Then CX 7 CX cy cy End if cx cx pointC X pointB X 2 cy cy pointC Y pointB Y 2 bx pointD X pointC X by pointD Y pointC Y If index pointsOrg Count 1 Then bx bx by by End if bx bx pointC X pointB X 2
169. and Area SQL Keywords will only return values in the projected space There appears to no easy SQL approach to returning these values using spherical algebra No longer true as of V7 Working directly with the Object set provides a way to get to ellipsoidal Length calculations Unfortunately it is slow One area slowing the processing is the updates to the status bar and progress bar Don t do this for every pass through the loop once every 100 passes is fine The process below can be replicated using Active Columns Example THE ACTIVE COLUMN FUNCTION BELOW CALCULATES THE SAME VALUES THAT MAPINFOO WOULD GIVE Function Spherical Speed Table is Azimuthal Equidistant World Geodetic 1984 WGS84 Set objs Table Owner ObjectSet Set obj objs objs ItemByID Record Data ID convert metres to Nautical Miles Length nm obj Geom Length 0 000539594075 Spherical Speed Round Length nm 6 0 1 End Function NVESTIGATE THE DISTANCEEARTH SQL KEYWORD DistanceEarth geomA geomB unit Returns ellipsoidal distance between given points I NOTES ZEN HURDAT DOES NOT HAVE TO BE PROJECTED THIS Jj ROUTINE WORKS ON LATITUDE LONGITUDE DRA
170. ar Fals Elself Yr Mod 4 0 Then IsLeapYear Tru IsLeapYear Fals End If End Function Yo kk ck ck ck ck ck Ck Ck Sk Ck 0k Sk Ck Ck Ck Ck Ck ck Ck ck Cc kk ck ck KK ck kk ck kk kk ck ck Ck ck kk Sk kk ck ck ck kk ck Sk Sk ko Mk Sk Mk kx k ko ko ko ko kockok 260 Using SendKeys to Load Dialogs chrismarx on 11 9 2006 9 59 AM 30049 http forum manifold net Site Thread aspx id 29979 Check this out here s a way to bypass the dialog box and automate the Paste As process it sends the command which is apparently interpreted as an enter so as long as your columns are formated with the right names there s no need to manually work through the dialog box Sub Main Set ActiveDoc Application ActiveDocument Set CompSet ActiveDoc ComponentSet Set Shell CreateObject WScript Shell Set Table CompSet Item Sheet1 4 Table Copy Shell SendKeys ActiveDoc PasteAs ComponentDrawing End Sub in response to a thread initiated by brbkr http forum manifold net Site Thread aspx id 30787 amp ti 6330242 19241100000 Option Explicit SelectNone http 69 17 46 171 Site Thread aspx id 21452 amp ti 632838853471300000 Use of Document and ActiveDocument in V7 http 69 17 46 171 Site Thread aspx id 21589 amp ti 632840185176300000 Sub Main Dim CompSet Drwg Shell Qry Dim LastSurface I ActiveDoc Path Dim Sfc surfaceCmpst Set CompSet Docum
171. arams ItemByName localOffsetY Value _ currentParams currentParams ItemByName localOffsetY Value Set the current projection theImage coordinateSystem theAMGCoordSys End Function 1 Ck ck ck KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko Sk ck Sk Sk ko Mk ko ko ko ko ko ko Apply a New Projection to an Existing Drawing Date Thu 02 16 2006 2 47 AM From Adam Wachowski adamw manifold net To Manifold List Subject Re Manifold I Script change current projection http lists directionsmag com discussion read php f 29 amp i 41556 amp t 41511 gt I d like to simply update the current projection params that can be gt done via script and is extremely quick Can you guide me here Create the projection you want and assign it to the desired component Sub Main Set csys Application NewCoordinateSystem Mercator Set drw Application ActiveDocument ComponentSet Drawing drw CoordinateSystem csys End Sub Alternatively reuse the projection of an existing component Sub Main Set drwl Application ActiveDocument ComponentSet Drawing 1 104 Set drw2 Application ActiveDocument ComponentSet Drawing 2 drw2 CoordinateSystem drwl CoordinateSystem End Sub gt What would really help neophytes like myself would be a Learn Mode gt where a series of GUI procedures would be stored into a script macro gt as they were done This could then be edited as
172. atLabelBorder EditFormatLabelCenterHorizontally EditFormatLabelCenterVertically EditFormatLabelFont EditFormatLabelFontBold EditFormatLabelFontltalic EditFormatLabelFontSize EditFormatLabelFontStrikeout EditFormatLabelFontUnderline EditFormatLabelForeground EditFormatLabelRotation EditFormatLabelStyle EditFormatLabelTextAlignLeft EditFormatLabelTextAlignRight EditFormatLabelTextCenter EditFormatLabelTextJustify EditFormatLighten EditFormatLineBackground EditFormatLineForeground EditFormatLineSize EditFormatLineStyle EditFormatLoadFromFile EditFormatMoveDown EditFormatMoveToBottom EditFormatMoveToTop EditFormatMoveUp EditFormatPointBackground EditFormatPointForeground EditFormatPointRotation EditFormatPointSize EditFormatPointStyle EditFormatReverse EditFormatSaveToFile EditFormatTraceColor EditFullHeight EditFullSize EditFullWidth EditGoBlank EditGoFirst EditGoLast EditGoNext EditGoPrevious EditGoTo EditGoToMatchingBracket EditHelpOnWord EditInstantData EditJoinWrapSelection EditLoadMaskChannel EditMakeLowercase EditMakeUppercase EditPaintAreas EditPaintLines EditPaintPoints EditPaste EditPasteAppend EditPasteAutoselect EditPasteSelectAll EditPasteSelectInverse EditPasteSelectNone EditProjectionLoadFromComponent EditProjectionLoadFromFile EditProjectionLoadRecent EditProjectionSaveToFile EditQueryArgument EditQueryColumn EditQueryOperation EditQueryOperationNot EditQuerySelect EditRedo EditRemov
173. ate lines from the table of records for the selected shark 204 Ensure at least two records SET records tbl Recordset IF records Count 2 Then remove the temperary query component Application ActiveDocument ComponentSet Remove Application ActiveDocument ComponentSet ItemByID query ID Application Messagebox There should be at least two selected points END IF Set up a coordinate system and create a new drawing T CS Application NewCoordinateSystem Latitude Longitude T nDwg Application ActiveDocument NewDrawing Bomber PTT 52526 CS Ej Dd Create new point set object SET pointset Application NewPointSet Scan queried table adding locations to point set FOR recordIndex 0 TO records Count 1 T record records recordIndex T point Application NewPoint Edit use the query table s column names point X CDbl record data SGT Longitude point Y CDbl record data Latitude pointSet Add point NEXT Ej Bj Create a new geometric entity SET geom Application NewGeom GeomLine PointSet Create new line object nDwg ObjectSet Add geom Remove the temperary query component Application ActiveDocument componentset Remove Bomber SET map Application ActiveDocument ComponentSet Map assign a custom colour to the line for Bomber nDwg LineBackground DefaultValue Formatting application NewColor DarkGreen
174. ategories and Products Sub Main initialization set components document ComponentSet get categories key column nItem components ItemByName Categories set tableCategories components Item nItem set columnsCategories tableCategories ColumnSet nitem columnsCategories ItemByName Category ID set columnCategoriesKey columnsCategories Item nItem get products key column nItem components ItemByName Products set tableProducts components Item nItem set columnsProducts tableProducts ColumnSet nitem columnsProducts ItemByName Category ID set columnProductsKey columnsProducts Item nItem add relation set relations tableCategories RelationSet relations Add columnCategoriesKey columnProductsKey map products column set columnProductsMap columnsCategories NewColumn nItem columnsProducts ItemByName Product Name columnProductsMap Name Sample Product columnProductsMap OriginColumn columnsProducts Item nItem columnsCategories Add columnProductsMap map categories column set columnCategoriesMap columnsProducts NewColumn nItem columnsCategories ItemByName Category Name columnCategoriesMap Name Category Name columnCategoriesMap OriginColumn columnsCategories Item nItem columnsProducts Add columnCategoriesMap tableCategories Open 39 tableProducts Open End Sub Clean Up Opened Table Sub Main Set windows Applic
175. ation WindowSet Set window windows ActiveWindow Set component window Component If component Type ComponentTable Then remove relations Set relations component RelationSet For nItem relations Count 1 To 0 Step 1 relations Remove nItem Next remove atoms Set atoms component DSSAtomSet For nItem atoms Count 1 To 0 Step 1 atoms Remove nItem Next reset selection Set records component RecordSet For nitem 0 To records Count 1 Set record records nItem record Mask record Mask And Not 1 Next End If End Sub Sales by Cities Report Sub Main create temporary query Dim s S select Customers City amp _ sum Order Details Unit Price Order Details Quantity 100 Order Details Discount 100 as Total amp _ from Customers Orders Order Details amp _ where Customers Customer ID Orders Customer ID amp _ and Orders Order ID Order Details Order ID amp _ group by Customers City set query document NewQuery Temporary Query Sales by Cities query Text s set table query Table set records table RecordSet 40 create new table set columns Application NewColumnSet set column columns NewColumn column Name City ID column Type ColumnTypeInt32U columns Add column column Name City Name column Type ColumnTypeWText columns Add column column Name Total colu
176. ave checked there are objects within the user defined area that should be selected For some reason the query is not cleared after the initial run Thanks for your help Brian adamw at 12 22 2005 6 02 AM 17332 Got it Replace the call to MapServer Query with JScript Application Lock mapserver Render mapserver Query Query Name true false Application UnLock This will select objects under the area albeit not in the fastest way possible 173 Final code below LAK map asp set render parameters for the TrackArea drawing var wktArea Session wktArea if wktArea null wktArea wktArea yields a NULL geom mapserver RenderParameters TrackArea wktArea Added this line JScript Application Lock mapserver Render mapserver Query Query Name true false Response BinaryWrite mapserver Render Manipulating IMS Layers via Code http 69 17 46 171 Site Thread aspx id 24275 amp ti 632883409638900000 exactmike at 7 12 2006 10 07 PM 24276 I think I ve got a pretty good handle on how the layers code in IMS can be manipulated from reading through the code in default asp the GISAdvisor IMS Template and from several posts on this forum listed here for convenient access for anyone else reading this post and wanting to learn about layers in IMS have added the links below L Ketch Layer Code turn on off IMS http 6
177. ax 1000 gt lt text style plain gt lt code gt lt style gt xml Adam Wachowski Manifold Development Team See Custom Scalable Styles for Points Areas and Labels help section LAK Following custum lines style taken from http forum manifold net Site Thread aspx id 31139 317 Line River Bank File Name SlopeStyle xml xml lt style gt lt name gt Bank lt name gt lt type gt line lt type gt lt preview gt 36 lt preview gt lt code gt lt refLine size 20 style solid gt lt polygon fore b gt lt point x 123 y 0 gt lt point x 123 y 100 gt lt point x 127 y 100 gt point x 127 y 0 gt lt polygon gt lt polygon fore b gt lt point x 373 y 0 gt lt point x 373 y 200 gt lt point x 377 y 200 gt point x 377 y 0 gt lt polygon gt lt polygon fore b gt lt point x 623 y 0 gt lt point x 623 y 100 gt lt point x 627 y 100 gt lt point x 627 y 0 gt lt polygon gt lt polygon fore b gt lt point x 873 y 0 gt lt point x 873 y 200 gt lt point x 877 y 200 gt point x 877 y 0 gt lt polygon gt lt code gt lt style gt lt xml gt Point Hourglass seatrails on 1 9 2007 7 41 AM 33216 KlausDE on 11 30 2006 8 46 AM 31212 Copy SlopeStyle xml into the config folder and start a new Manifold session You need to set the size to pretty high va
178. by by pointC Y pointB Y 2 bx 3t POINTE X 2 F esx 03 de SX py SC pointe Y 2t ey 3 dy p ax pointC X bx cx dx ay pointC Y by cy dy For i 0 to 19 t i 20 0 Next Set point Application NewPoint point X ax t t t bx Ge tot ck t dx point Y e ay b AE E amp cby ney t kdy pointsFin Add point Next Set point Application NewPoint e resulting point set interpolating th intermediate point set point X pointsInt pointsOrg Count X point Y pointsInt pointsOrg Count Y pointsFin Add point add new branch and remove the former branch branches Add pointsFin branches Remove 0 End Sub BSpline join selected points with spline Join Selected Points with Spline Joins points selected within the active drawing window with an opened 3 spline The order of points on a spline is determined by their IDs Join Selected Points with Closed Spline Joins points selected within the active drawing window with a closed b spline The order of points on a spline is determined by their IDs Closed Spline Joins points selected within the active drawing window with a closed b spline Sub Main Set windows Application WindowSet fail if there are no opened windows If windows Count 0 Then Application MessageBox No active window Exit Sub End If Set window windows ActiveWindow Set component window Component fail i
179. cation Application list lt globals gt 3 eS ActiveDocument gf Analyzer Basically what you have here is AnalyzerValue a concise list of prop erties and gg AnalyzerValueSet es DefaultCoordinateSystem methods for all of the Manifold OEE eS DefaultCoordinateSystemLatLon f h W Base es DefaultDatum objects Note that some items in Border ES DefaultFilePath the Members pane are simple E Branch BS DefaultUnit properties that return text or BranchSet xl e amp DefaultUnitLatLon numbers and other properties are other objects When you click on eadbon Manifold items in the Members pane the box at the bottom of the dialog will tell you what type of object is returned to the code that DAAE references the object DocumentSet 2 es B For example scroll down the list until you come to Property FullName As String Application FullName You will read only see it returns a String text and Member of Manifold Application it is read only Click DocumetSet just above and you will note that it returns an object of type ObjectSet Immediate Window Open you code window again and step into the code using F8 Step to just past the Set manApp statement Then select View Immediate Window from the menus In the new window type manApp FullName manapp FullName Manifold System 5 50 Enterprise Edition SP2 build 348 93 The will display what it can text and numbers It will not display objects But you can keep
180. cations to point set For recordIndex 1 to records Count 1 dx tempPointSet Item recordIndex X dy tempPointSet Item recordIndex Y cx tempPointSet Item recordIndex X tempPointSet Item recordIndex 1 cy tempPointSet Item recordIndex Y tempPointSet Item recordIndex 1 If recordIndex 1 Then CX CXx cy cy End if cx cx tempPointSet Item recordIndex 1 X tempPointSet Item recordIndex X 2 cy cy tempPointSet Item recordIndex 1 Y tempPointSet Item recordIndex Y 2 bx tempPointSet Item recordIndex 2 X tempPointSet Item recordIndex 1 by tempPointSet Item recordIndex 2 Y tempPointSet Item recordIndex 1 If recordIndex records Count 1 Then bx bx by by End if bx bx tempPointSet Item recordIndex 1 X tempPointSet Item recordIndex X 2 by by tempPointSet Item recordIndex 1 Y tempPointSet Item recordIndex Y 2 bx 3 tempPointSet Item recordIndex 1 X 2 cx 3 dx bx by 3 tempPointSet Item recordIndex 1 Y 2 cy 3 dy by ax tempPointSet Item recordIndex 1 X bx cx dx ay tempPointSet Item recordIndex 1 Y by cy dy For i 0 to 19 t i 20 0 Set point Application NewPoint point vax L t Tot bX t ex Et dx X s point Y ay t t t by t t cy t dy PointSet Add point Next Next Set point Application NewPoint point X tempPointSet Item recor
181. ccccsscccececeesesececececsenesececececsenenseaeseeeceesenssaeseeeeseeenees 321 ROTATING SYMBOLS ON A CONTINUOUS SCALE esee een nnne entre nhat seen ee ete nsns essen tete nasse eene ten nn nis 323 CUSTOM LAY OUT DEMPEATES 5 425 iir hires bt re ibo ced Youes ire juhda donc oubuadiec eva ous ibi e nk 323 VB NET READER FOR XML UNITS FILE ccccccssssscecececsesessccecececeeseseseceecceceesaueceeceecseauecececseseseaeeeeeeeeseneneaeees 324 V7x Object Model Graphic DocumentSet Document Manifold System Release 7x Object Model WindowSet L window P may be one of DrawingWindow LabelWindow LayoutWindow ColumnSet see below one of Band Fant 7 ME uuu mmm eee uu QueryParameterSe QueryParametel one of importAdt mporiadonet L Ezmssecnsc ESTE seo above ImportAdoNetSqlServer ImportDng ImportDoq ImportDsn ImportDted ImportDxf ImportE00 aM RecordSet DSSQue DSSQueryEnti DSSAtomSet DSSAtom ImportEcw ImportEnvi ImportErdas ImportErs ImportGdf ImportErdasImagine ImportFit ImportGcdb ImportGif ImportGrd ImportHdf ImportHtml Importimdisp ImportJpeg 8 Format DUREE ImportGeoSpot Dremu see above ImportGml ImportGrdSurfe ImportGrass ImportGxf B E a 8 a ImportHdfEos m RichControl one of MapServerOgcWfs ImportUdi ImportVct ImportVmap ImportWk ImportXis Importx
182. ch Import query name of folder to import folder Application InputBox Enter folder caption if folder length return create file system object and obtain folder fso new ActiveXObject Scripting FileSystemObject fld fso GetFolder folder if fld null Application MessageBox Folder does not exist caption return Import fld VK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK ko Import folder function Import folder var imp Application NewImport ADF examine files with adf extension this loop is a bit overkill changed it from th xampl xcept to make it work for me var files new Enumerator folder Files I just haven t 148 for files atEnd files moveNext fil files item name file Name dotPos name lastIndexOf if dotPos gt 0 I only import w001001 adf ext name substring dotPostl name length toLowerCase if name w001001 adf imp Import file PromptNone import subfolders var folders new Enumerator folder SubFolders for folders atEnd folders moveNext Import folders item code temp tag to be replaced VBScript to set the current projection of all surfaces Note that this assumes that projection and datum of all are the same and that the scale and offset values are correctly
183. colorMax gt lt colorDef gt cd853f colorDef gt lt values gt value gt 0 00 value gt value gt 1 00 value gt value gt 2 00 value gt value gt 3 00 value gt value gt 4 00 value gt lt values gt lt theme gt xml 210 You can copy and past color value pairs to cover the expected values I changed the lt to to avoid browser issues On the first pass don t worry about color just get an equal number of color and value tags Then load the theme to tweak the colors and save it for re use Points note you can use square point symbols and vary the size to get a fairly decent looking gridded surface Each zoom level requires a new size so that s a bit of a pain Separate themes with varing point zoom levels can help Another method is to build a static reusable cell layer make one from the View Grid Graticule dialogs and use Spatial Overlays to move the data to the cells from the points Perfomance is an issue with either method Someday Manifold will get around to gridded data if you ask for it Listing the Projection for Each Map Layer VK KKK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK OX THE FOLLOWING MANIFOLD L THREAD GIVES THE BACKGROUND tox THIS IS ADAM S SUGGESTION IN A SCRIPTED FORM Ex L Ketch April 9 2006 VK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Sent Thu 04 06 2006 5 19 PM TO manifold l lists directio
184. comps Application ActiveDocument ComponentSet set the merged surface Set merged comps Merged iterate over each surface in component copying contents to merged For each cmp in comps If cmp Name lt gt merged Name And cmp Type ComponentSurface Then cmp Copy FALSE copy entire component not just selection merged Paste FALSE paste but don t replace selection comps Remove comps ItemByName cmp Name End If Next End Sub code temp tag to be replaced 12 10 2003 1 30 AM Alert An addition 151 mdsumner 2003 12 09 7 13 PM However it doesn t have to have this constraint the paste will resize Merged and resample the pixels of the copied surface appropriately As far as the Confirm expanding images or surfaces when pasting option in Tools Options Confirmations is turned on Adam Wachowski Manifold Development Team 06 05 2005 9 35 PM Alert Hello The VBScript to set the current projection of all surfaces works great for my needs except that it changes the units from Arc second to degrees How would I edit the script so that arc seconds is retained Thanks in advance Justin 06 10 2005 8 32 AM Alert There is a Unit object that is part of the CoordinateSystem object Try experimenting with that If writing small experimental scripts is causing you difficulty then you may need to rephrase your query 06 10 2005 9 01 AM Alert Hi Mike Yes I am pretty well
185. conciled to layouts and exported as tiffs or pdfs I include a script below that hacks together some of the scripts It iterates through the Tiles Drawing and generates a layout entry for each object I ll leave it to you to figure out 191 the appropriate scale and size The tiles drawing can be created on a regular grid simply by using the show gird create tiles function Tiles is a drawing with the desired grid one tile one area object If you have a regular grid you can use the create tiles grid function to generate tile objects with which you can derive the box corner min max values Make sure the Tiles drawing and the map component have the same projection and both local values are equal to 1 0 This assumes meters Make sure your default printer preferences are set to your desired output page size I also include an export routine you can hack to desired effect 1 Ckok ck ck ck KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko ko ko Sub Main SET ManDoc Application activedocument SET ManComps ManDoc ComponentSet Set TilesObjs ManComps Tiles ObjectSet in borderMargin 10 in scale 30000 meters inch 1609 27 meters pica meters inch 72 63360 in scale TileIndex 1 For Each TilesObj in TilesObjs SET ManLayout ManDoc NewLayout Tile Cstr TileIndex ManLayou EntrySet AddComponent ManComps Map SET ManLE ManLayout EntrySet Item 0 D ct BoxWidth i
186. ctive component is not a drawing If Component Type ComponentDrawing Then Application MessageBox Active component is not a drawing Exit Sub End If Set ObjSelection Component Selection fail if there s no selected objects If ObjSelection Count 1 Then Application MessageBox No selected objects Exit Sub End If ask for output filename FileName InputBox File name Input Set FSO CreateObject Scripting FileSystemObject create file Set Stream FSO CreateTextFile FileName True write all selected objects For i 0 to ObjSelection Count 1 write object type Stn If ObjSelection Item i Type ObjectPoint Then Str Point ElseIf ObjSelection Item i Type ObjectLine Then Str Line Else Str Area End If Stream WriteLine Str write number of branches for lines and areas Set ObjBranchSet ObjSelection i Geom BranchSet If ObjSelection i Type lt gt ObjectPoint Then Stream WriteLine ObjBranchSet Count End If write each branch For j 0 to ObjBranchSet Count 1 Set ObjPointSet ObjBranchSet j PointSet 50 If ObjSelection i Type lt gt ObjectPoint Then Stream WriteLine Obj PointSet Count End If For k 0 to ObjPointSet Count 1 Str ObjPointSet k X amp amp ObjPointSet k Y Stream WriteLine Str Next Next write blank line after each object Stream WriteLine Next close file Stream Close End
187. d Manifold not to hold on to the old data Is there a way to reset the data center so that a 3D terrain view initializes above the remaining data And second if I start where the 3D terrain view comes up now is there a much faster way of getting to the data I want to see Thanks for any help From jburn gis 2cogeco ca Sent December 12 2006 11 13 PM To Frank O Donnell manifold l lists directionsmag com Subject re Manifold l Navigating within a 3D terrain view http lists directionsmag com discussion read php f 29 amp i 42896 amp t 42895 134 Something to try Open your map or surface so that you can see both your 3D terrain and 2D surface Now open the world pane alt sft o You can use whatever combination you like but I like to show the track on my 2D view and center on my 3D view Now as you move around the terrain you ll see that the crosshair move on the 2D view You can now use the regular pan function in 2D to move your area of interest towards the crosshairs which will also change in your 3D view Happy flying From Michael Sumner Sent December 12 2006 11 36 PM To Frank O Donnell Cc manifold l lists directionsmag com Subject Re Manifold l Navigating within a 3D terrain view http lists directionsmag com discussion read php f 29 amp i 42897 amp t 42895 gt Is there a way to reset the data center so that a 3D terrain view initializes above the remaining gt data And second i
188. d Point Set ptMax Application NewPoint Set ptMin Application NewPoint ptMax x rect Box XMax ptMax Y rect Box YMax Set ptMax manComp CoordinateSystem ConvertInverse ptMax ptMin x rect Box XMin ptMin Y rect Box YMin Set ptMin manComp CoordinateSystem ConvertInverse ptMin Report AddText westbc amp FormatNumber ptMin x LatLongDigits 0 0 0 amp westbc amp vbCrLf Report AddText eastbc amp FormatNumber ptMax x LatLongDigits 0 O0 0 amp eastbc amp vbCrLf Report AddText northbc amp FormatNumber ptMax Y LatLongDigits 0 0 0 amp northbc amp vbCrLf Report AddText southbc amp FormatNumber ptMin Y LatLongDigits 0 0 0 amp southbc amp vbCrLf End If end if Application StatusText Application StatusText amp Report AddText bounding amp vbCrLf Report AddText spdom amp vbCrLf Report AddText keywords amp vbCrLf Report AddText theme amp vbCrLf Report AddText themekt ToDo None free text themekt amp vbCrLf Report AddText themekey ToDo keyword keyword etc themekey amp vbCrLf Report AddText theme amp vbCrLf Place is not mandatory but common Report AddText place amp vbCrLf Report AddText placekt ToDo None Geographic Names Information System free text placekt amp vbCrLf Report AddText placekey ToDo placekey amp vbCrLf Repo
189. d Sub Yo kk ck ck ck ck ck CK ck Sk Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck ck ck kk ck ck ck ck Sk ck ck ck ck kk ck kk ck ko Sk ck Sk Sk ko ko k ko ko ko koko k Return the Identity Column Name Private Function Identity Column Name ByRef Drwg Author Lorne Ketch Email Ketch at hfx dot eastlink ca The ID Identity column many not always be labelled as ID The function locates the correct Identity column Adam explains this in the GeoReference thread below adamw at 4 10 2006 7 07 AM 420352 http 69 17 46 171 Site Thread aspx id 20092 amp ti 632803720515300000 You might want to modify the condition in the line filtering the intrinsic columns and the ID column to VBScript If Not clmn IsIntrinsic And Not clmn Identity Then This will make the code more robust Under certain circumstances the name of the ID column might differ from ID and the names of the intrinsic columns might not end with Dim Col Cols Set Cols Drwg OwnedTable ColumnSet hen amp Drwg Name 307 Identity Column Name For Each Col in Cols If Col Identity Then Identity Column Name Col Name Exit Function nd If ct pH Nex End Function 1 kkxkxkxkxkxkxkxkkxkxkxkxkkkkxkkkkkkkkkkkkkxkkkkkkkkkkkxkkkkkkkkkkxkkkxkkxkxkkxkkxkkkkxkkkkkkkxkxx k Collect Collumn Names All Regular Intrinsics only etc C Documents and Settings Lorne_Limited My Documents Manifold VBscrip
190. d all the layers into one layer The script is ran from my local drive while the project files are stored in a server Half way through the process manifold crashes resulted in a Windows error report dialogue appearing My question is whether this is a bug or some thing else As i recall i do not have any problem with this when i upgrade from 6 0 to 6 50 Thanks adamw at 6 7 2006 6 19 AM 22261 This is a bug Running a script should never crash I suggest you send a report to tech support and offer to upload example MAP files that can be used to reproduce the problem http forum manifold net Site Thread aspx id 3 1334 amp ti 633008 135566530000 adamw on 12 2 2006 6 20 AM 31365 No that s not normal It is expected that some data sets will be too large to handle but Manifold should not crash ever Anything that results in a crash is a bug I suggest you take this to tech support You Can Not Currently Contour Data Using a Script http lists directionsmag com discussion read php f 29 amp i 4 1 189 amp t 41187 Adam Wachowski Calculating Spherical Distances and Areas in Manifold HURDAT My Subroutine solutions for this L Ketch Active column and Form based routines follow Note that this can be done much easier with V7 SQL using either the DistanceEarth or LengthEarth functions Option Explicit UPDATING THE SystemSpeed kts COLUMN IN THE HURDAT TABLE 219 The Length
191. d what is the number of pixels unit for that surface Dim rectBB As Rect If cmp Type ComponentType ComponentSurface Then Dim surf As Surface cmp rectBB surf PixelSet Box Else rectBB cmp objectset box End If Dim cs As CoordinateSystem cmp CoordinateSystem Dim dLocalOffsetX As Double _ cs ParameterSet Item cs ParameterSet ItemByName localOffsetX Value Dim dLocalScaleX As Double _ cs ParameterSet Item cs ParameterSet ItemByName localScaleX Value RWU Real World Units m feet Dim dXMaxRWU As Double dLocalOffsetX rectBB XMax dLocalScaleX Dim dWidthRWU As Double dXMaxRWU dLocalOffsetX _ rectBB XMin dLocalScaleX Width in Real World Units Use offsets and scales of coordinate system to calculate pixel size Dim dUnitPerPix As Double _ dWidthRWU rectBB Width Pixel size width of the surface in the used unit meter 97 scale2scaleInternal dScale dUnitsPerDot dUnitPerPix End Function VK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Cancelling the ProgressBar Object from VB NET http 69 17 46 171 Site Thread aspx id 18930 amp ti 632888409 132730000 Does anyone know the code to successfully handle a user enacted cancel of the ProgressBar object in VB NET for an Add in to Manifold 7 I include the following line of code in my loop however it does not seem to be correct as the ProgressBar does not halt
192. de jscript temp tag to be replaced handle mapserver commands that do not change state string else if command layers for index 0 index lt parseInt count indextt mapserver TurnLayer index parameter layer index on keeps the layer 0 on if mapserver TurnLayer 0 true mapserver TurnLayer 0 parameter layer 0 on code temp tag to be replaced This is just a small example I was working with 2 layers only but it works I managed to hide layer 0 from the panel but keeping it always on allowing the user to only select unselect the layer 1 180 Cheers from Portugal AndrT Coutinho How to Disable Layers on Startup http 69 17 46 171 Site Thread aspx id 38 17 amp ti 6322728 18600000000 cas at 7 20 2004 8 37 AM 3818 Hi How do i disable the layers on startup The layers apears enabled when i enter in the web site but 1 want that it be disabled and only when the user clicks in the checkbox of a layer it apears Any help on this P S I m working with manifold v 5 50 cas 2004 07 20 5 37 AM How do i disable the layers on startup The layers apears enabled when i enter in the web site but 1 want that it be disabled and only when the user clicks in the checkbox of a layer it apears Use something like this in DEFAULT ASP untested code code jscript temp tag to be replaced TN ya var state parameter state create ma
193. dings 063 Wingdings 064 Wingdings 065 Wingdings 066 Wingdings 067 Wingdings 068 Wingdings 069 Wingdings 070 Wingdings 071 Wingdings 072 Wingdings 073 Wingdings 074 Wingdings 075 Wingdings 076 Wingdings 077 Wingdings 078 Wingdings 079 Wingdings 080 Wingdings 081 Wingdings 082 Wingdings 083 Wingdings 084 Wingdings 085 Wingdings 086 Wingdings 087 Wingdings 088 Wingdings 089 Wingdings 090 Wingdings 091 Wingdings 092 Wingdings 093 Wingdings 094 Wingdings 095 Wingdings 096 Wingdings 097 Wingdings 098 Wingdings 099 Wingdings 100 Wingdings 101 Wingdings 102 Wingdings 103 Wingdings 104 Wingdings 105 Wingdings 106 Wingdings 107 Wingdings 108 Wingdings 109 Wingdings 110 Wingdings 111 Wingdings 112 Wingdings 113 Wingdings 114 Wingdings 115 Wingdings 116 Wingdings 117 Wingdings 118 Wingdings 119 Wingdings 120 Wingdings 121 Wingdings 122 Wingdings 123 Wingdings 124 Wingdings 125 Wingdings 126 Wingdings 127 Wingdings 128 Wingdings 129 Wingdings 130 Wingdings 131 Wingdings 132 Wingdings 133 Wingdings 134 Wingdings 135 Wingdings 136 Wingdings 137 Wingdings 138 Wingdings 139 Wingdings 140 Wingdings 141 Wingdings 142 Wingdings 143 Wingdings 144 Wingdings 145 Wingdings 146 Wingdings 147 Wingdings 148 Wingdings 149 Wingdings 150 Wingdings 151 Wingdings 152 Wingdings 153 Wingdings 154 Wingdings 155 Wingdings 156 Wingdings 157 Wingdings 158 Wingdings 159 Wingdings 160 Wingdings 161 Wingdings 162
194. ds Count X point Y tempPointSet Item records Count Y PointSet Add point create new geometric entity Set geom Application NewGeom GeomLine pointSet create new line object component ObjectSet Add geom remove temporary query component components Remove components ItemByID query ID End Sub Centroids traverses Cities drawing adding centroid of a set of cities for each county Create Centroids Traverses Cities drawing adding centroid of a set of cities for each county Sub Main Set components document ComponentSet locate target drawing Set drawing components components ItemByName Cities locate and execute helper query Set query components components ItemByName Cities by County Set table query Table Set records table RecordSet 13 cou Crt x y App For CStr xr Set record records recordIndex acquire record data countyNew CStr record Data County xNew CDbl record Data X I yNew CDbl record Data Y I If countyNew lt gt county Or recordIndex If cities gt 0 Then create centroid Set point Application NewPoint point X x cities point Y y cities pointSet Add point amp CStr recordIndex 1 nty wee ies 0 0 0 lication StatusText Scanning table scan queried table creating centroids as necessary recordIndex 0 To records Count 1 Application StatusTex
195. dx rightX WinPt X dx topY WinPt Y dy bottomY WinPt Y dy Select Touch All Objects in All Map Layers that Touch a Bounding Object http 69 17 46 171 Site Thread aspx id 22016 amp ti 632847696209 100000 I want to take all the layers in my Map Ports Stations Railroads etc and select those parts that are touching the rectangle in the Bounding Box layer I suppose I could add those two lines for all the 30 layers in my map but I thought there would be an easier way Couldn t I use a LayerSet operation or a loop or something here to automatically process all the map layers in the same way right Thats why I mentioned a loop Remember you have a layerSet object Do this 208 Sub Main Set ZActiveDoc Application ActiveDocument Set ZCompSet ZActiveDoc ComponentSet Set ZProvinces ZCompSet Item Provinces Set ZBoundBox ZCompSet Item BoundingBox Set ZNewDraw ZCompSet Item NewDraw Set ZAnalyzer ZActiveDoc NewAnalyzer For each Layerl in ZCompSet Item Map LayerSet ZAnalyzer SelectTouching layerl Component layerl Component ObjectSet _ ZBoundBox ObjectSet Next End Sub Thank you so much I just made a couple little changes and it worked like a charm Sub Main Set ZActiveDoc Application ActiveDocument Set ZCompSet ZActiveDoc ComponentSet Set ZBoundBox ZCompSet Item Bounding Box Set ZAnalyzer ZActiveDoc NewAnalyzer for each layerl in ZCompSet Item Map LayerSet Z
196. e and you will see the Terminology and Coding Conventions Simple Script In the simple example bellow I will use terms in context as a way to define the terms User defined variables will begin with lower case letters and Manifold objects will begin with upper case VBScript reserve words will also begin with upper case To get started with a typical script you will what to get a reference to component that is showing in your Project Pane In this example case the drawing component named Drawing Change your script to read Sub Main Set document Application ActiveDocument Wik Sete Components document Componentser X2 Application MessageBox There are amp components Count amp components in the document 3 Set component components Drawing 4 Application MessageBox Component 6 component EyoeName Gyo ey component Name Hello World V5 End Sub The first line stores a reference to the project file you have opened Application ActiveDocument returns a reference to an object of the type Document and the Set VBScript function stores it in the variable document The Application object is a bit different from most other objects in that it is always present and does not need a Set statement in order to be used Think of the Application object as representing the running instance on the Manifold program Objects have Properties single attribute values and collections and provides Methods to ma
197. e End Sub VK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK ko kx ko ko jump to first category Sub First Click If CategoryIndex 0 Then CategoryIndex 0 Reload End If End Sub VK KKK KK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK Sk Ck KKK KKK KKK KKK KKK KKK KKK kx ko ko ko ko jump to last category Sub Last Click If CategoryIndex CategoryCount 1 Then CategoryIndex CategoryCount 1 Reload End If End Sub VK KKK ck kk Ck Ck Ck CK Ck Ck Ck Ck Ck Ck Ck KC Ck Ck Ck Ck Ck Sk Ck Ck Ck Ck kk Ck ck kk Ck kk Ck ck Ok Ck kk Sk Sk Sk Sk Sk Sk kv ko ko ko ko ko ko jump to next category if any Sub Next Click If CategoryIndex CategoryCount 1 Then CategoryIndex CategoryIndex 1 Reload End If End Sub VK KKK KK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK Ck Ck KKK KKK KKK KKK KKK KKK KKK KKK kx ko ko ko ko jump to previous category if any Sub Previous Click If CategoryIndex 0 Then CategoryIndex CategoryIndex 1 Reload End If End Sub 1 Ckokckck ck ck ck Ck ck kk Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck Ck Ck Ck kk Ck ck kk Sk kk Sk Sk kk kx ko kv ko ko ko ko ko ko load current category Sub Reload Set Rec Categories RecordSet CategoryIndex set category readout Category Text Rec Data Category Name amp amp CStr CategoryIndex 41 amp 45
198. e drawingName Type ColumnTypeWText drawingTable ColumnSet Add drawingName pi 3 141592653589793 scan query adding lines as necessary Set records queryTable RecordSet recordIndex 0 recordCount records Count Do While recordIndex recordCount Set record records recordIndex obtain name of creating line name CStr record Data Name Set pointSet Application NewPointSet log starting location Set point point X point Y Application NewPoint CDb1 record Data X CDb1 record Data Y pointSet Add point advance to next record recordIndex recordIndex 1 create line Do While recordIndex recordCount Set record records recordIndex check for start of next line nameCurrent CStr record Data Name If LCase name lt gt LCase nameCurrent Then Exit Do End If azimuth CDbl record Data X pi 180 distance CDbl record Data Y X point X distance Sin azimuth y point Y distance Cos azimuth log current location Set point Application NewPoint point X x point Y y pointSet Add point advance to next record recordIndex recordIndex 1 Loop If pointSet Count gt 1 Then append created line if its metric has at least two locations Set geom Application NewGeom GeomLine pointSet append line drawing ObjectSet Add geom End If Loop drawin
199. e converter and convert the input drawing to the proper coordinate system dim cc Set cc Application NewCoordinateConverter cc Prepare dwg CoordinateSystem coordSysNew dim startTime startTime Now If cc ConvertsData Then Application StatusText Converting to projection amp coordSysNew Name amp Please wait Dim objIdx obj for objIdx 0 to dwg ObjectSet Count 1 set obj dwg ObjectSet objIdx Application StatusText Converting drawing to projection amp coordSysNew Name amp Projecting object amp objIdx amp of amp dwg ObjectSet Count 114 cc Convert obj Geom next End If Application MessageBox Projection time amp DateDiff s startTime Now amp seconds Reprojection Statistics Attach the new coordinate system object to the document dwg CoordinateSystem coordSysNew doc BatchUpdates false End If End Sub adamw at 1 23 2006 9 53 PM 18172 You could try shaving some time off by tuning the heaviest loop to VBScript objIdx 1 objTotal dwg ObjectSet Count For Each obj in dwg ObjectSet If objIdx Mod 10 0 Then Application StatusText Projecting object amp objIdx amp of amp objTotal End If objIdx objIdx 1 cc Convert obj Geom Next Convert Coordinate System via Code Sent Mon 01 23 2006 6 24 PM To Manifold List From Malcolm Edwards ingenix com Subject Poor Performance With CoordinateConverter conver
200. e emen nennen 209 LISTING THE PROJECTION FOR EACH MAP LAYER ccce e enne ene nthnnnn seen teneras sess ee tetas n sese stent te nennen 211 CHECKING THE WINDOWSET FOR A MAPCOMPONENT THEN FINDING THE ACTIVE DRAWING cc 215 ZOOM TO SELECTED OBJECT IN MAP WINDOW AND SAVE AN IMAGE eee eene ennemi ne nennen enne 216 SETTING MAP LAYER ORDER BY CODE vis 5e eetoecct fev edet eurem QU Suave eei eos eieeer ibo esee vedete cae denies casseneateseate 217 TURNING LAYERS ON AND OFF VIA A SCRIPT cccssscccecccsessssscecececeesesseaececcceceessaaeceecesesesaseceeeceesensaeeeseceeseneseaeees 217 COLLECT A MAP WINDOW PARAMETER SET COORDSYS WIDTH CENTERX ETC ccscecssessceescesseeseceteeeeenseenses 217 A UEIe D BEEN UCET 219 MANIFOLD SHOULD NEVER CRASH eese eee nnne enne tn nn ntes eren te tena sr sess sete te anas sess ee ete anas e e ente tensa nes 219 YOU CAN NOT CURRENTLY CONTOUR DATA USING A SCRIPT ccccsessscecececeessaeceeececeenssseceeccecsensaeceeeesesenenseaeees 219 CALCULATING SPHERICAL DISTANCES AND AREAS IN MANIFOLD HURDAT etes 219 CREATE A COMPONENT AT THE ROOT LEVEL NOT IN AN EXISTING FOLDER eese 223 COPY A COMPONENT FROM ANOTHER MAP FILE APPLYING THEMATIC LEGENDS esee eene CALLING ONE SCRIPT FROM ANOTHER SCRIPT ccsssssscceceesessscecececcesessssececececeesesaeseeececeecssueeeeeceesensseseeeesesenentnaeees
201. e following syntax C Program Files Manifold System manifold exe slist c tempWMManifold Formatting Options txt Table V7 Area styles Aug 12 2006 brick brickArab brickStar checkers circleDots circleDotsH circleDotsQ circles corners Cross dashBounds dashDots dashH dashShortH dashShortV dashSwamp dashSwampAlt dashV doubleF doubleG doubleH doubleV netBulb netBulbCross netBulbDeco netBulbF netBulbG netBulbH netBulbV netBulbXCross netCross netCrossSmall netDash netH netV plain plate plateCombo plateConcrete plateConcreteHole plateWrap plateX Table V7 Line styles Aug 12 2006 arrow arrowAlt arrowAltOver arrowOutline arrowOutlineRev arrowOver arrowOverRev arrowRev arrowSpacedOutlineOver arrowSpacedOutlineOverRev arrowSpacedOver arrowSpacedOverRev axial axialBold box boxCenter boxDot boxDotDotDot boxOver boxProper singleF singleG singleH singleV solid squares stairDown stairUp stripH strips stripThickF stripThickG stripThickH stripThickV stripV ticksH tShapes tShapesRev xCheckers xCross zigzag capArrow capArrowDeco capArrowDecoDot capArrowDecoRev capArrowDecoRevDot capArrowDot capArrowLong capArrowLongDot capArrowLongRev capArrowLongRevDot 278 capArrowRev capArrowRevDot capCircle capCircleDot capCircleRev capCircleRevDot capDiamond capDiamondDot capDiamondRev capDiamondRevDot capSquare capSquareDot capSquareRev capSquareRevDot
202. e lines here Set Objs Comp ObjectSet If Objs Count 0 Then Application Messagebox No Objects in amp Comp Name Exit Sub End If NumberOfLines 0 For Counter 0 to Objs Count 1 If Objs Item Counter Type ObjectLine Then NumberOfLines NumberOfLines 1 End If Next If NumberOfLines 0 Then Application Messagebox No Line Objects in amp Comp Name Exit Sub End If Get the intesection points NOTE If precision is an issue pass the precision specification to the IntersectionPoints method Example eps 0 1 Set pts Objs GeomSet IntersectionPoints eps Set Pts Objs GeomSet IntersectionPoints There is really no error handling methodolgy in VBscript If no Line Intersections are found in Drawing then the Pts Count below will generate an error The only way to check this is to set On Error Resume Next check the Point count then check for an error On Error Goto 0 turns off error checking On Error Resume Next NumberOfPoints Pts Count If Err gt 0 Then Application Messagebox There are no Line Intersections in amp Comp Name Exit sub End If If Component_Exists Point Coordinates Then Set Comment_Intersections Comps Comps ItemByName Point Coordinates 197 Else Create a Comment Set Comment_Intersections Document NewComments Point Coordinates TRUE End If If Component_Exists IntersectionPoints Drawing Then ClearDrawing IntersectionPoints Draw
203. e saved a few times each of which took 10 min There were 20 DEM surfaces from ADF format e Total 600Mb e these came from some obscure ESRI source most had 1m pixels some had 2m pixels e each had varying amounts of invisible pixels These were imported all to Manifold by script e Total map 450Mb e this took about 20min Current projection of all was incorrect but localScale X Y and localOffset X Y were correct so only projection needed setting in Current Projection The current projection of all were set to the correct UTM 49 S by script e localOffset and localScale values were preserved as variables in the script before changing Current projection e this took a few seconds A surface Merged was created to cover extent of all separate surfaces to 2m pixels this was done by hand in the GUI e it was ensured that the local offset X Y of merged was correct e all pixels in Merged were made invisible since the default zero would conflict with some DEM heights e surface size was 8750x16681 type was Float32 e this took 10min for Manifold to create the surface and a few minutes to make sure the offset and scale and extent were OK All separate surfaces were then copied and pasted to Merged using a script e this of course resampled to 2m pixels where necessary e each surface in turn was deleted after copying to save memory here must iterate from ComponentSet Count down since this changes on deletions e always
204. eLine EditReplace EditResetFormat EditSameHeight EditSameHeightMax EditSameHeightMin EditSameWidth EditSameWidthMax EditSameWidthMin EditSaveMaskChannel EditSelectAdd 268 EditSelectAll EditSelectAllInLayers EditSelectAreas EditSelectBorder EditSelectByType EditSelectContract EditSelectExpand EditSelectIntersect EditSelectInverse EditSelectInverseInLayers EditSelectInvert EditSelectLabels EditSelectLines EditSelectNone EditSelectPixels EditSelectPoints EditSelectReplace EditSelectSmooth EditSelectStyle EditSelectStyleBorder EditSelectStyleDashes EditSelectStyleDenseDots EditSelectStyleMediumDots EditSelectStyleNone EditSelectStyleSparseDots EditSelectSubtract EditSelectToMatchingBracket EditSharedEdit EditSnapToAreas EditSnapToColor EditSnapToElements EditSnapToGraticule EditSnapToGrid EditSnapToLabels EditSnapToLines EditSnapToPoints EditSnapToSegments EditSnapToSelection EditSpaceAcross EditSpaceDown EditTransformApply EditTransformOperation EditTransformSource EditTransformTarget EditUncommentSelection EditUndo EditWrapSelection ElevationOpenProfile ElevationOpenSurface FileClose FileCloseAll FileCreateChart FileCreateChartMoveDown FileCreateChartMoveToBottom FileCreateChartMoveToTop FileCreateChartMoveUp FileCreateChartSelectAll FileCreateChartSelectInverse FileCreateChartSelectNone FileCreateChartShowT ypes FileCreateComments FileCreateDrawing FileCreateElevation FileCreateFolder FileCreateFo
205. ect Scripting FileSystemObject this code creates a test xml file useful for testing Set Stream FSO CreateTextFile D NGIS DATAMMetadataNtestNtest xml True Stream Write Report Text Stream Close This code creates a file using the Report Name Note that the Report Name may not be a valid fle name in many instances so watch out for that Set Stream FSO CreateTextFile D NGIS DATA Metadata test amp Report Name amp xml True i Stream Write Report Text Stream Close End Select End If MetadataMandatoryRpt sRptName End Function 1 Ckokck ck ck ck ck Ck Ck kk Ck CK Ck Ck Ck C Ck Ck Ck CK Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck ck kk Ck kk Ck ck Sk Ck kk Sk Sk kk kx Kk kv Sk ko k ko ko ko Function ComponentReport ByVal Component Dim s i Dim System Dim params Dim Objects Dim geom Dim rect s Component TypeName amp amp Component Name amp vbCrLf s s amp Note amp Component Note amp vbCrLf s s amp Description amp Component Description amp vbCrLf Select Case Component TypeName Case Drawing Surface Map Image ignore Select Case Component TypeName Case Map Layout Case Else s s amp Zoom amp Component zoommin amp amp Component zoommax amp vbCrLf End Select set System Component CoordinateSystem set params Component CoordinateSystem Parameters append drawing to report If Component TypeN
206. ectSet set geom manObjSet GeomSet set rect geom EnclosingRect Case Image Surface dim obj Set obj manComp set rect obj PixelSet Box Case Else not done yet Report AddText westbc ToDo westbc amp vbCrLf Report AddText eastbc ToDo eastbc amp vbCrLf Report AddText lt northbc gt ToDo lt northbc gt amp vbCrLf Report AddText lt southbc gt ToDo lt southbc gt amp vbCrLf End Select If Not rect Is Nothing then If manComp CoordinateSystem Name Latitude Longitude Then 160 Report AddText westbc amp FormatNumber rect Box XMin params params ItemByName localScaleX value LatLongDigits 0 0 0 amp westbc amp vbCrLf B Report AddText eastbc amp FormatNumber rect Box XMax params params ItemByName localScaleX value LatLongDigits 0 0 0 amp eastbc amp vbCrLf Report AddText northbc amp FormatNumber rect Box YMax params params ItemByName localScaleY value LatLongDigits 0 0 0 amp northbc amp vbCrLf Report AddText lt southbc gt amp FormatNumber rect Box YMin params params ItemByName localScaleY value LatLongDigits 0 0 0 amp southbc amp vbCrLf Else Dim ptMax As Manifold Point Dim ptMin As Manifol
207. ects that have a Close method and any object that was set using the Set VBA command should be set to Nothing Here is the code with the error statement removed Option Explicit Sub Tutorial Queda ror Goto ca TETE Dim manApp As Manifold Application Dim manDoc As Manifold document Dim filePath As String Set manApp Manifold Application filePath MDS Vests DAWA Scripto oerip i nautorial map T pali to your file nere Set manDoc manApp DocumentSet Open filePath True Application MessageBox Path to map file amp manDoc Path vbExclamation VBA POE kSI Toca Exit On Error Resume Next block error handling during cleanup to avoid loop Uxc JNO manDoc Close goa JNelel Set manDoc Nothing ge lel Set manApp Nothing ccc Add Exit Su ccc Add KOCERTI Application MessageBox VBA Err amp amp VBA Err Description Resume Local Exit Weeks Gell while testing comment out the statement above Stop F8 to return to statement with the error Resume End Sub 92 Additional IDE Tools Object Browser Immediate Window Locals Window On the IDE toolbar click the TSR Object Browser icon Object Browser BE Lieu x You should see this probably Manifold EN 3 full screen after you choose a Manifold from the dropdown list Search Results a Click on Application and scroll through the Members of Casses Members of Appli
208. ed as in the script above Rect is really for obtaining bounding boxes which are then use for querying existing objects or for specifying viewports in maps etc and passing to image rendering methods to set the scope Extract Object Coordinates via Script Driven SQL Code below is Not Form driven For both Forms and non form versions see C Documents and Settings Lorne Limited My Documents Wanifold VBscriptExtract Object Coords map PKK ck ck ck kk ck Ck kk Ck Ck Ck Ck Ck Ck Ck S Ck Ck Ck Sk Ck kk Ck Ck kk Ck Ck kk Ck kk Ck ck kk Ck kk kk kk Sk kk ko Sk kk Sk Kk kt ko ko ko ko ko ko Option Explicit PKK ck ck ck ck ck ck ck kk Ck kk Ck Ck kk Ck kk ck ck kk Ck KKK KKK ck ck ck ck ck kk ck KKK ck kk ck ck kk ck kk ck ck kk ck ck kk ck ko Sk ko Sk kv Sk ko ko kx ko ko Sub Main Dim Comps Drwg Author Lorne Ketch Permission to use modify and distribute this code is granted provided that you cite the original author Email Ketch at hfx dot eastlink ca Set Comps Document ComponentSet Set Drwg Comps Drawing 2 Build Run SQL Drwg 8 End Sub PKK ck ck ck ck ck ck ck kk KK KKK kk Ck kk Ck ck kk Ck ck KK kk ck ck ck ck ck kk ck ck kk ck ck ck ck ck kk ck ck ck ck ck kk koc kk ck ko Sk ko ck kv Sk Sk x ko ko ko 289 Private Sub Build Run SOL ByRef Drwg ByRef Mode Author Lorne Ketch Permission to use modify and distribute this code is granted provided that you cite the original author
209. eger number ColumnTypeInt8 8 bit integer number ColumnTypeInt8U Unsigned 8 bit integer number ColumnTypeLatitude Latitude value 300 ColumnTypeLongitude Longitude value ColumnTypePercentage Percentage value ColumnTypeTime Date and time value ColumnTypeURL URL string ColumnTypeWChar Unicode character ColumnTypeWText Unicode string Scripting Table Relationships http 69 17 46 171 Site Thread aspx 1d 28521 amp ti 632955606300630000 I ve been able to create a relation via a script However I don t know where one turns on the actual columns to view the columns in the related table RelationSet Add allows you to create the relation but I can t find out how to then tell Manifold to include the specific columns when viewing the related table I was going to post an answer to this the other day when I saw your earlier post but I guess I misunderstood that you had sorted it out In ScriptTableNwind Map the lines below add the mapped columns after the relation has been created The key items are creating a new column object under the ColumnSet of the table you re working on and setting the OriginColumn property map products column set columnProductsMap columnsCategories NewColumn nItem columnsProducts ItemByName Product Name columnProductsMap Name Sample Product columnProductsMap OriginColumn columnsProducts Item nItem colum
210. emByName Employees If EmpPos lt 0 Then Application MessageBox Employees table not found Form Visible False End If Set Employees Components EmpPos EmployeeIndex 0 EmployeeCount Employees RecordSet Count load controls Reload End Sub VK KKK KK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko Mk ko ko ko close form Sub Close Click Form Visible False End Sub DKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko kv ko ko A kx ko ko jump to first employee Sub First Click If EmployeeIndex 0 Then EmployeeIndex 0 Reload End If End Sub VK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK Ck Ck KKK KKK KKK KKK KKK KKK KKK KKK ko ko ko ko ko jump to last employee Sub Last Click If EmployeeIndex EmployeeCount 1 Then EmployeeIndex EmployeeCount 1 Reload End If End Sub 1 Ckokckck ck kk Ck Ck C Ck Ck Ck KK KKK KKK KC Ck Ck Ck Ck Ck Sk Ck Ck Ck Ck kk Ck ck kk Ck ck ok ck ck kk Ck kk Sk Sk kk Sk kx kv ko ko ko ko ko ko jump to next employee if any Sub Next Click If EmployeeIndex EmployeeCount 1 Then EmployeeIndex EmployeeIndex 1 Reload End If End Sub 47 KKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK KKK KKKKKKKK KKK KKKKKKKKKKKKKKKKKKKKKKK jump to previous employee if any Sub Previous Click If EmployeeIndex 0 Then Empl
211. ent window Component If component Type lt gt ComponentDrawing And _ component Type lt gt ComponentImage And _ component Type lt gt ComponentLabels And _ 59 component Type lt gt ComponentMap And component Type lt gt ComponentSurface Then Application MessageBox Active window should contain drawing image labels map or surface Exit Sub End If render context component to image and place image into a folder named Screenshots Set document Application ActiveDocument If document ReadOnly Then Application MessageBox Can t create new image component Document is read only Exit Sub End If folderName Screenshots renderName component Name amp amp x amp x amp y amp amp Date amp amp Time render context component to image Call component RenderTo renderName x y True locate rendered image and move it into a folder named Screenshots renderIndex document ComponentSet ItemByName renderName If renderIndex gt 0 Then Set render document ComponentSet Item renderIndex If render Type ComponentImage Then folderIndex document ComponentSet ItemByName folderName If folderIndex lt 0 Then Set folder document NewFolder folderName Else Set folder document ComponentSet Item folderIndex End If If folder Type ComponentFolder Then render Folder folder End If End If End If End Sub 1 Ckokckck ck ck ck
212. ent ComponentSet Set Drwg CompSet Item SalesData Drawing Set surfaceCmpst CompSet Item Composite Surface Set Shell CreateObject WScript Shell ActiveDoc Path Document Path Make sure the Query component exists If CompSet ItemByName TmpQuery lt 0 Then Set Ory Document NewQuery TmpQuery Else Set Qry CompSet Item TmpQuery End If 261 If CompSet ItemByName SalesData Drawing 2 gt 0 Then CompSet Remove CompSet ItemByName SalesData Drawing 2 End If LastSurface 47 For I 1 to LastSurface Qry Text _ UPDATE SalesData Drawing SET SalesData Drawing Selection I TRUE amp _ WHERE Contains SELECT Neighborhood Buffer Drawing Geom I amp _ FROM Neighborhood Buffer Drawing WHERE NeighbNum amp cStr I amp amp SalesData Drawing Geom 1 Ory Run Drwg Copy TRUE Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys 100 Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys TAB Shell SendKeys Shell SendKeys Document PasteAs ComponentSurface Set Sfc CompSet Item SalesData Drawing 2 Qry Text _ UPDATE SELECT
213. ent like and therefore has more area David M Brubacher OLS OLIP Two or More Active Columns in One Table http 69 17 46 171 Site Thread aspx id 20942 amp ti 632828332475870000 Is it possible to have two Active columns in one Table The trick is there is only one script for one table with a function for each of the active columns So for the second active column you get the script with the function for the Ist structure and have to add the 2nd function from scratch Create a Column Counter Sequenced Number using an Active Column http 69 17 46 171 Site Thread aspx id 1 1 1 amp ti 632053080800000000 Here is an example that shows how to create a counter column Create anew MAP file Create a new table with Name text and Key integer columns Open table Add active column named KeyService set function name to KeyService column type to integer and column computation mode to on demand Set script text to Function KeyService If Record Data Key Record Data Key End If 0 Then RecordSet Maximum Key 0 Data Key 1 KeyService Record Data Key End Function 68 L Ketch V7 allows a much faster running solution Function KeyService KeyService Record Index End Function Switch to table Click the cell under the Name column Enter some text Click Enter Click Shift Enter to append the new record Add more records The KeyService function will compute uniq
214. ertCommandButton MouselnsertCommonDialog MouselnsertCoolBar MouselnsertDateTimePicker MouselnsertEllipse MouselnsertEllipseOnCenter MouselnsertFrame MouselnsertFreeform MouselnsertHorizontalScrollBar MouselnsertImage MouselnsertImageComboBox MouselnsertImageList MouselnsertLabel MouselnsertLabelLine MouselnsertLabelLineFreeform MouselnsertLegend MouselnsertLine MouselnsertLineFreeform MouselnsertLineHorizontal MouselnsertLineSequence MouselnsertLineVertical MouselnsertListBox MouselnsertList View MouselnsertMaskedTextBox MouselnsertMonthView MouselnsertMultimedia MouselnsertNorthArrow MouselnsertOleObject MouselnsertOptionButton MouselnsertPictureClip MouselnsertPoint MouselnsertProgressBar MouselnsertRichTextBox MouselnsertScaleBar MouselnsertSlider MouselnsertStaticText MouselnsertStatusBar MouselnsertSystemInfo MouselnsertTabStrip MouselnsertText MouselnsertTextBox MouselnsertToolBar MouselnsertTree View MouseInsertUpDown MouselnsertVerticalScrollBar MousePaintAirBrush MousePaintArea MousePaintAreaFreeform MousePaintBox MousePaintBoxOnCenter MousePaintBrush MousePaintBucket MousePaintCircle MousePaintCircleOnCenter MousePaintEllipse MousePaintEllipseOnCenter MousePaintEraser MousePaintGradient MousePaintLine MousePaintText MousePickColor MouseSelectArea MouseSelectAreaFreeform MouseSelectBox MouseSelectBoxOnCenter MouseSelectCircle MouseSelectCircleOnCenter MouseSelectEllipse MouseSelectEllipseOnCente
215. esseeseeeseeseceseceseceseceaecaaecseecaeecaeeeaeeeeeseeeseesssenaeeeseenseeaeenaes 105 XL VBA CREATE A COMPONENTS PROJECTION REPORT cscsssscsececsesessecececcesenssseceeececsenenseseeeeeceeceeaeeeeseeeneanes 106 RESET ORTHOGRAPHIC PROJECTION CENTRE TO MAP WINDOW CENTRE cccccsesesescscseseseseseseseseeeseseseseseseseuenees 109 REASSIGN COMPONENT COORDINATE SYSTEM amp DATUM KEEP ORIGINAL SCALES amp OFFSETS 109 APPLYING A LAT LONG COORDINATE SYSTEM TO A POINT cccccceesssceceessececeeseececsseeeceesseeecessseeecssseecseaeeeeensaeees 111 IMPROVING PERFORMANCE WHEN USING COORDINATECONVERTER CONVERT eene nennen 113 CONVERT COORDINATE SYSTEM VIA CODE Q ccsessssssecececeessscecececeesesnsaeceeececeeesueceeececeeeaaeceeececseseaeeeeeeeeseneneaeees 115 TWEAKING A SURFACE COORDINATE SYSTEM ssssssssesececsessscecececcessnssaeeeeececeesssueceeececescesueceeeeseseseaeeeeeeeeseneanaeees 117 VERIFYING THE COORDINATE SYSTEM FOR A LARGE NUMBER OF COMPONENTS ssssesssseeececsesesseceeeeeceenenseaeees 118 BATCH REPROJECT DRAWINGS cccccccecsesssssceeececeessesecesecccseneuseeceeeceesesseuseeeecceesuaueceeceeceeeaueceesesesesesaeeeeeeeesenenaeaeees 119 BUILD COORDINATE SYSTEM OBJECT FROM WKT STRING cessere enne eth nnn nie enne tenen nes 120 CONVERT A POINT FROM DRAWING COORDINATE SYSTEM TO LAT LON eee eene emen ener 121 EXTRACT MAP LAYER COORDINATE SYSTEM INFORMA
216. et newFolder fso CreateFolder settings 0 If Not IsEmpty newFolder Then fExists True End If End If Use yes no from inputBox and convert to 1 0 for converter prompt Select Case LCase settings 4 Case yes prompt 1 Case Else prompt 0 End Select option for using components in specified folder vs entire project if settings 1 lt gt then set compSet compSet settings 1 children end if drawings have to be handled seperately to check if they are empty if settings 2 Drawing then iterate through every in compSet to match the specified typ for each comp in compSet if comp TypeName settings 2 then empty drawings cannot be exported so must check if not comp isEmpty then Application StatusText Exporting amp comp name amp to amp settings 0 amp comp name amp amp settings 3 create exporter of given type set genExporter document NewExport ucase settings 3 export the drawing to the specified folder call genExporter Export comp settings 0 amp comp name amp amp settings 3 prompt 167 end if end if next else for each comp in compSet if comp TypeName settings 2 then Application StatusText Exporting amp comp name amp to amp settings 0 amp comp name amp amp settings 3 create exporter of given type set genExporter document NewExport ucase settings 3 export the drawing to t
217. et the labels to be synchronized with the drawing You could avoid adding labels by hand by setting the Synchronized property to False and then back to True VBScript Sub Main Set Points Document ComponentSet Drawing Set Labels E Document NewLabels Labels E Points Labels E Text ID Labels E Synchronized False Labels E Synchronized True Labels E PerLabelFormat True End Sub I have added a request to populate the labels component the moment you set the Synchronized property to True for the first time so that there is no need to set it to False first A small note You cannot rely on the added labels component to be the last one in the component set Use the value returned by Document New Labels VBScript Set Labels E Document NewLabels Temp Str amp Labels E Points TRUE Sorry Adam one additional question There are many examples on GeoReference and the archive site of using my previous method to assign a new component Pasted from the clipboard to an object variable Set Comps Documen DrawingObj Copy TRU Document PasteAs ComponentDrawing Set NewDrawing Comps Item Comps Count 2 ComponentSet Gl ct Is a newly Pasted component guaranteed to be the last in the component set This would be rather important when attempting to duplicate a component or a selection from a component via script since there does not appear to be a DUPLICATE method for any
218. ext lt addrtype gt amp vbCrLf lt address gt may be repeated if required Report AddText lt address gt ToDo lt address gt amp vbCrLf Report AddText lt city gt ToDo lt city gt amp vbCrLf Report AddText lt state gt ToDo lt state gt amp vbCrLf Report AddText lt postal gt ToDo lt postal gt amp vbCrLf Report AddText country ToDo country amp vbCrLf optional Report AddText cntaddr amp vbCrLf Report AddText cntvoice ToDo cntvoice amp vbCrLf Report AddText cntinfo amp vbCrLf Report AddText metc amp vbCrLf Report AddText metstdn FGDC Content Standards for Digital Geospatial Metadata lt metstdn gt amp vbCrLf Report AddText lt metstdv gt FGDC STD 001 1998 lt metstdv gt amp vbCrLf Report AddText lt metainfo gt amp vbCrLf Report AddText lt metadata gt amp vbCrLf Case Else sRptName Active window should be a geographic component End Select Application StatusText Application StatusText amp If True write output to a file add remove comments to create one test xml file or a batch of files also edit the pathname to match your PC If False Then Select Case manComp TypeName Case Drawing Surface Image ignore others this code creates a test xml file This code should be modified to point to your folder file preferences Dim FSO Stream 162 Set FSO CreateObj
219. extended with a new slist option which dumps the names of all formatting styles available for areas labels lines and points into a text file Example syntax manifold exe slist file txt To specify the full program path and path to the resultant text file use the following syntax C Program Files Manifold System Wnanifold exe slist c temp Manifold_Formatting Options txt 285 Objects IDs Assigned to New Drawing Objects are not Guaranteed to be Sequential Manifold L Jan 11 2006 Author Adam Wachowski Date 01 10 2006 23 55 http lists directionsmag com discussion read php f 29 amp i 4 1307 amp t 41307 gt A programmer I am working with wants to resort the gt order of the objects in a drawing exported as midmif gt is it possible for the native sort order of objects to gt be reset and ordered No However as it has been suggested by Mike Sumner you can re create the drawing adding the objects in the order you want The easiest way to do this 1s to create a query like SELECT FROM Drawing ORDER BY DesiredColumn and import that as a drawing using Geom I as a geometry column The most interesting part of this is that while most exports including the MIF MID export will export the resulting drawing in the literal order of records in the producing query the internal specs place no restrictions on a the order with which a drawing import processes query records
220. f On Error GoTo O0 Count AfterPaste Comps Count If Count BeforePaste Count AfterPaste Then Application MessageboxEX Msg Error MessageBoxTypeSystemModal Exit Function End If Application MessageboxEX Msg Error MessageBoxTypeSystemModal Do some error checking just in case the Paste fails MessageBoxTypeOK OR MessageBoxTypeOK OR 247 For Each Comp in Comps New ID TRUE For Index 0 to Count BeforePaste 1 If Comp ID IDs BeforePaste Index Then New ID FALSE Exit For End If Next If New ID Then We have a newly added ID Index Comps ItemByID Comp ID If Index 1 Then Set Comp Comps Item Index Some Paste operations result in more than one new Component being added to the project Ex Pasting a drawing also pastes the associated table and we get 2 new components The user asked for a duplicate of a specific Component That Index will be passed back Example User requested a duplicate of a Drawing Pasting the Drawing will also Paste the associated Table We are interested in the Index for the Drawing If Comp Type Original Comp Type Then Duplicate Component Index Exit Function End If End If End If Next If Duplicate Component FALSE Then If we got to this code are then Duplicate Component will be FALSI Gl Application MessageboxEX Msg Error MessageBoxTypeOK OR End If End Func
221. f I start where the 3D terrain view comes up now is there a much faster gt way of getting to the data I want to see 2 Using the World Pane you can use another component to centre the view Surface Analysis Script slope orientation vertical amp horizontal curvature calculation http www georeference org Forums tabid 71 forumid 7 tpage 1 view topic postid 353 Default aspx 375 http 69 17 46 171 Site Thread aspx 1d 362 amp ti 632526961800000000 Abram 12 02 2003 12 45 PM This small script allow the user to perform specific analysis slope orientation vertical and horizontal curvatures This analysis is performed using the methods described by Burrough and allows the user to defined the window size nxn This was developed in order to manage lidar digital elevation data with 1 meter resolution but can be used with any dem resolution the power of user defined window is the management of the context encountered in the analysis The code is open to any use but be careful due to the scripting version it is slow The resulting surfaces are appearing black because the display setup is currently not accessible through script but should appear in the next version Feel free to contact me for any comment or additional information 135 abram DEM ANALYSIS SCRIPT Yo Ckokck ck ck ck ck ck ck kk ck kk kk ko k ck ckock ko k ck kk performs slope orientation vertical and horizontal curvature calcu
222. f active component is not a drawing If component Type ComponentDrawing Then Application MessageBox Active component is not a drawing Exit Sub End If create temporary query component Set components document ComponentSet Set query document NewQuery Temp query Text SELECT ID X I Y 1 FROM component Name WHERE Selection 1 AND Type I 1 ORDER BY ID KLUDGE verbatim value of 1 in Type I 1 fragment filters out line and area objects Set table query Table ensure there are at least two records Set records table RecordSet If records Count 3 Then remove temporary query component components Remove components ItemByID query ID Application MessageBox There should be at least three selected points Exit Sub End If Set temppointSet Application NewPointSet For recordIndex O0 to records Count 1 Set record records recordIndex Set point Application NewPoint point X CDbl record Data X I point Y CDbl record Data Y I tempPointSet Add point Next For recordIndex 0 to 2 Set record records recordIndex Set point Application NewPoint point X CDbl record Data X I point Y CDbl record Data Y I tempPointSet Add point Next create new point set object Set pointSet Application NewPointSet scan queried table adding locations to point set For rec
223. f country Type ObjectArea Then transfer columns from current country to all cities that lie within this country For cityIndex 0 To cities Count 1 Set city cities cityIndex Skip area objects that can get created by the CreateCircle script or by the user If city Type ObjectPoint Then Set cityRecord cityRecords cityRecords ItemByID city ID protect from double visiting the same city If cityRecord Data Country Then project city here IF coordinate systems of country drawing and city drawing are different If country Geom CheckContains city Geom Then copy country field 31 cityRecord Data Country countryRecord Data Country lt lt lt transfer other fields here if necessary stop crawling through countries End If End If End If Nex End If Next Application StatusText End Sub Transfer Country Name to Each City using Query Equips each city with name of the country it is in using queries Sub Main Set components document ComponentSet locate city drawing drawingIndex components ItemByName Cities If drawingIndex 0 Then Application MessageBox No Cities component Exit Sub End If Set drawing components drawingIndex ensure component is drawing If drawing Type ComponentDrawing Then Application MessageBox Cities is not a drawing Exit Sub End If obtain table and set of table record
224. fterPaste Comps Count If Count BeforePaste Count AfterPaste Then Exit Function For Each Comp in Comps New ID TRUE For Index 0 to Count BeforePaste 1 If Comp ID IDs BeforePaste Index Then New ID FALSE Exit For End If Next If New ID Then We have a newly added ID Index Comps ItemByID Comp ID If Index 1 Then Set Comp Comps Item Index Some Paste operations result in more than one new Component being added to the project Ex Pasting a drawing also pastes the associated table and we get 2 new components The user was pasting a primary Component Type Pass that Index back If Comp Type ComponentType Constant Then 243 Document PasteAs Index Exit Function End If End If End If Next End Function VK KKK KKKKKKKKKKKKKKKKKKKKKKKKKKKKK KKK KKK KKKKKKKKKKKKKKKKKKKKKKK Duplicate a Component Option Explicit Author Lorne Ketch Email LKetch at hfx dot eastlink ca Script workaround to find a replacement for the GUI Duplicate function This routine uses a copy and paste approach Sub Main Dim Comp Comps New Index Set Comps Document ComponentSet Set Comp Comps Item DrawingB New Index Duplicate Component Comp TRUE If New Index False Then Exit Sub Else Set Comp Comps Item New Index End If Application MessageBox Pasted Component s Name amp Comp Name amp End Sub
225. gTable Open drawing Open End Sub BSpline2 smooths selected lines Splinearize Selected Lines supply line name to autogenerated line record WARNING it would be safer to obtain newly created object with drawing LastAdded and locate record using its ID property drawingTable RecordSet drawingTable RecordSet Count 1 Data Name name Smooths lines selected within the active drawing window by 3 splines Smooths lines selected within the active drawing window by 3 splines Sub Main Set windows Application WindowSet fail if there are no opened windows If windows Count 0 Then Application MessageBox No active window Exit Sub End If Set window windows ActiveWindow Set component window Component fail if active component is not a drawing If component Type ComponentDrawing Then Application MessageBox Active component is not a drawing Exit Sub End If process each selected lin Set objects component Selection For Each object In objects If object Type ObjectLine Then SmoothLine object End If Next End Sub 1 Ckokckck ck ck ck Ck Ck kk Ck CK Ck Ck Ck CK Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck ck kk Ck kk Ck ck kk Ck kk Sk Sk kk Sk Kk kv ko ko ko ko ko ko Sub SmoothLine object Set branches object Geom BranchSet reject objects with more than one branch use Decompose transform to split such objects into parts If br
226. gTransformMoveHorizontally DrawingTransformMoveVertically DrawingTransformNearestNeighbor DrawingTransformNearestNeighborSymm DrawingTransformNearestPair DrawingTransformNodePoints DrawingTransformNormalizeMetric DrawingTransformNormalizeTopology DrawingTransformPoints DrawingTransformRelativeNeighborhoodNetwork DrawingTransformRemoveDuplicates DrawingTransformReverseLines DrawingTransformRotate DrawingTransformScale DrawingTransformScaleHorizontally DrawingTransformScaleVertically DrawingTransformSegments DrawingTransformSelectAdjacentTo DrawingTransformSelectContainedWithin DrawingTransformSelectContaining DrawingTransformSelectCriticalServiceCenter DrawingTransformSelectEuclideanPointCoverage DrawingTransformSelectIntersecting DrawingTransformSelectLineCoverage DrawingTransformSelectNCriticalServiceCenters DrawingTransformSelectNServiceCenters DrawingTransformSelectPointCoverage DrawingTransformSelectServiceCenter DrawingTransformSelectShortestPath DrawingTransformSelectSpanningTree DrawingTransformSelectTouching DrawingTransformShapeHull DrawingTransformSpanningTree DrawingTransformSpline DrawingTransformSplit DrawingTransformTriangulation DrawingTransformTriangulationAreas DrawingTransformTriangulationLines DrawingTransformUnion DrawingTransformVoronoi DrawingTransformVoronoiAreas DrawingTransformVoronoiLines DrawingTransformVoronoiPoints DrawingUnlink EditAlignBottom EditAlignLeft EditAlignRight EditAlignTop EditAssig
227. gs Labell Text Selection Changed in amp args Component Name If TypeOf args Component Is Manifold Interop Table Then cast the sucker to a table Dim tblOurTable As Manifold Interop Table tblOurTable CType args Component Manifold Interop Table If tblOurTable Selection Count 0 Then Labell Text Labell Text amp vbNewLine amp No Objects Selected Else Dim i As Integer For i 0 To tblOurTable Selection Count stringbuilder is obviously better here Labell Text Labell Text amp vbNewLine amp Selected ID amp _ tblOurTable Selection i ID ToString Next End If End If End Sub VB Net Samples http forum manifold net Site Thread aspx id 32243 amp ti 633017663024830000 diwakar_rs on 12 15 2006 3 41 AM 32244 I am very new to manifold migrated from asp maps GIS engine Are there any sample applications on manifold in VB Net ASP Net or related to IMS KlausDE on 12 15 2006 7 55 AM 32259 Search this forum and the archive for MapControl OR ComponentControl The ComponentControl is the object you will use for an application Be sure to notice the few threads dealing with events Here you find a collection of examples using ComponentControl http 69 17 46 171 Site Thread aspx id 27477 amp ti 632938400526500000 ManifoldControl zip http forum manifold net Attachments 54 27483 ManifoldControl zip DemoMap zip http forum manifold net Attachments 58 27485 Demo
228. h one might need specific projection attention David J Weinschrott PhD Sent Fri 04 07 2006 10 06 AM From adamw manifold net Tos manifold 1 lists directionsmag com Subject RE Manifold 1 Finding the bad apple gt it would be cool to be able to put up a table that gt would list projections of each layer Here is what you could do Create a table named Data with a text column named Name Open the tabl and add a record for each component you are interested in Create a new query and set its text to 122 ECT Name CoordSys Name AS COMPONENT CoordSys INTO CoordSystems I Run sele You Eo e the query Open the resulting table Right click the CoordSys column ct Format set formatting style to XML and click OK Resize the column should see the name of the coordinate system preset in the first 50 or haracters of the XML between name and lt name gt Adam Wachowski Mani KKK K Option Sub Ma Dim Dim Dim Dim Dim Dim Dim Set fold Development Team KKK Ck Ck KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko Sk kv ko ko kx ko ko ko Explicit in Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca Comp CoordSys Table Cols Col Rcrd Rcrds Active Window Coord Sys CoordSys ParmSet Map Layer Map Layers Active Window A
229. he line is pointing so simple single branch lines with 2 points are assumed There is some basic trig that works out the right values for the camera angles from the point to point bearing I just guessed until I got it right really so no guarantees or anything but C is for cookie that s good enough for me It could use the surface slope to pick a sensible camera Z angle I guess but for now I keep my eyes to the road The script currently assumes that you have Height values in your drawing for each line segment so you can add an offset at the start of the script to fly above the ground some specified amount It is set to expect your terrain window to be open and active that there is a drawing Drawing with line segments and that each line segment has an attribute height Easy to turn this off if desired There is also a delay funtion to make Manifold wait a specified number of seconds between each move I suggest you start with small values like 0 1 seconds if you want to try this Enjoy I hope it s of interest to someone The Manifold object model is really coming along I might even post up an example map file to make this easier for people to see in operation Note that it would be easy to export each terrain view to image files that could then be animated Y C CK Ck Ck Ck KC Ck KK KKK kk Ck Kk Ck Ck Ck Ck Kk Ck ck kk Ck kk Ck KKK Ck Kk Ck ck kk Ck kk Ck ck Sk Ck kk kc kk Sk kk Sk ko Sk KKK kv ko ko ko ko ko ko Terra
230. he specified folder call genExporter Export comp settings 0 amp comp name amp amp settings 3 prompt end if next end if End Sub TKK ck ck ck ck ck Ck ck kk Ck kk Ck ck kk Ck KKK ck kk Ck ck ck KK KKK ck ck ck ck kk ck ook kk ck ck Sk ck ck ko Sk ko ck kv kx ko kv Sk ko ko kx ko Generate and Export Tile Images http 69 17 46 171 Site Thread aspx id 2 1 174 amp ti 632834835570100000 thommy at 5 16 2006 7 19 AM 21175 Hello How can I generate a picture at a certain position in coordinates with a certain dissolution in a certain zoom from a MAP Layer are all Drawings I found the Tool Make image but there I can t generate a picture from a certain point The whole problem in more detail I must describe a solution how I can with Manifold generate of a certain zoom stage pictures lining up with given width and height over a certain range Does somebody know a possible solution by coincidence mdsumner at 5 16 2006 5 16 PM 21220 You can create a grid of points representing the centres of each tile use Snap To Points to centre the view on the point zoom to the appropriate scale and then use F6 Centred view at current scale with the image dimensions appropriately specified for the tile which you can work out given your tile spacing and scale Before the Rect object and matching RenderAreaTo method I used to do a lot of this This can be scripted by iterating across the grid implicitly specif
231. hings are okay we are not out of the woods yet We can make a blunder the IDE cannot detect To help us deal with this we will put in some error handling Add the marked lines to your code Opticn Bapl edu Sols TOCOL Lra On Error Golo Local Err Ule Dim manApp As Manifold Application Dim manDoc As Manifold document Dim filePath As String filePath 1 0 cause an error Yoc Jel Set manApp Manifold Application filePath D GIS_DATA Scripts ScriptingTutorial map path to your file here Set manDoc manApp DocumentSet Open filePath True Application MessageBox Path to map file amp manDoc Path vbExclamation VBA Eos iOcal Exit Ecce vell Exit Sub ya Aga ocal Err Uca JaXolol Application MessageBox VBA Err amp amp VBA Err Description Es cel Resume Local Exit ig Jvolol while testing comment out the statement above Ux Add Stop F8 to return to statement with the error Ui Rd Resume eg vole End Sub Press F5 to test You should see the error message and when you click OK you will hit the Stop statement Press F8 to step back to the statement in error Unlike the VBScript IDE you can edit the code while you are stepping through the code Place a single quote in front of the statement in error and use F8 or F5 to continue You can right click while stepping and move the highlight to a different statement 9 It is always a good idea to cleanup before the final exit Close all obj
232. how one would write to gt the binary Manifold MAP file format gt http lists directionsmag com discussion read php f 29 amp 1 41166 amp t 41166 You could produce MAP files using the Manifold object model through COM or NET 95 The following C code creates a blank MAP file adds a drawing adds some points and saves the result using System using System Reflection using Mfd Manifold Interop namespace Test class App STAThread static void Main String _args Mfd Application app new Mfd ApplicationClass Mfd Document _doc _app NewDocument false Mfd Drawing drw doc NewDrawing Drawing Missing Value false drw ObjectSet Add app NewGeom Mfd GeomType GeomPoint app NewPoint 1 1 _drw ObjectSet Add app NewGeom Mfd GeomType GeomPoint app NewPoint 2 2 _doc SaveAs C Documents Test map Adam Wachowski Creating a View with a Specific Scale http 69 17 46 171 Site Thread aspx 1d 20558 amp ti 632812323737970000 paquet at 4 19 2006 5 35 AM 20559 Hi I m accessing a map file using VB Net I d like to create a View for a component at a desired cartographic scale e g 1 10 000 When we create a view it requires a scale but it s the scaleInternal It seems there is no explanation in Manifold Manual on scaleInternal How can we create a view with desired cartographic scale paquet p s I know how to do this using Component windows but since
233. http forum manifold net Site Thread aspx id 3 1629 amp ti 633010714970600000 c calhoun on 12 7 2006 5 45 AM 31632 xml style lt name gt ESRI Environmental amp Icons 33 lt name gt ESRI Environmental amp Icons symbol 433 symbol lt type gt point lt type gt lt style gt xml c calhoun on 12 7 2006 5 47 AM 31635 Apparently it just reformats it here SO just put amp without the quotes in replace of your amp in the lt name gt and tags and it should work c calhoun on 12 7 2006 5 48 AM 31636 really last time here I don t know why this won t let me post the text properly put amp amp without any quotes and without any spaces XML Schema CANNOT be used to validate a File Cannot retrieve the URL Many June and July 2006 postings seem to be lost at http lists directionsmag com discussion list php f 29 and http lists directionsmag com discussion search php f 29 From adamw a manifold net To manifold l g lists directionsmag com Sent Tue 06 27 2006 10 00 AM Subject RE Manifold 1 GPX support First off I agree that it would be good to be able to import GPX and KML files into Manifold If enough people request this functionality I have no doubts it will appear in future updates With that taken care of I would like to address what seems to be a common misconception with regard to the use of XML as an interchange format 7 Scisoft said it al
234. i List ListCount 1 To 0 Step 1 If List Selected i Then List Removeltem i End If Next End If End Sub 1 kk ck ck ck ck ck Ck Ck Sk Ck Ck Sk Ck Ck Ck Ck Ck Ck Ck kk kk ck ck ck ck kk ck kk kk ck ck kk kk ck kk ck kk ck ko Sk ck Sk Sk ko Sk Sk Mk kx k ko ko ko ko kockok remove all items from list Sub DeleteAll Click List Clear End Sub 1 kk ck ck ck ck ck CK Ck kk Ck Ck Ck Ck Ck Ck ck kk Ck ck ck ck Sk ck ck Ck ck ck ck ck ck ko ck kk ck ck ck ck kk Sk ck ck ck ck ck ko ko ck Sk Sk ko ko Sk Mk kx k ko ko ko ko kocko close form Sub Close Click Form Visible False End Sub Yo kkxkxkxkxkxkxkxkkxkxkxkxkkkkxkkkkkkkkkkkkkxkkkkkkkkkkkxkkkkkkkkkxkxkkkkxkxkkkxkkxkkkxkkkkkkkkxkx k 20 Hello Jscript Pearl Python VBscript See http www activestate com for more information J Script say hello using built in Application object function Main Application MessageBox Hello World Pearl Script say hello using built in Application object Perl scripts require ActiveState ActivePerl version 1 0 or later sub Main SApplication gt MessageBox Hello World Python Script Python scripts require ActiveState ActivePython version 1 0 or later say hello using built in Application object def Main Application MessageBox Hello World VBscript say hello using native VBScript function Sub Main Application MessageBox Hello World End Sub 21
235. ide diode o A ee L Messenger Private Type Library Sub Tutorial C Microsoft Access 9 0 Object Library _ Microsoft Active Server Pages Object Library C Microsoft Active Server Pages ObjectContext Object Microsoft ActiveMovie Control Micrnenft ActiveX Nata Nhierte Dim manApp As Manifold Application Dim manDoc As Manifold document Dim filePath As String 1 iIti dimensinnal Set manApp Manifold Application Manifold System Type Library filePath D GIS DATA Scripts ScriptingTutorial map Location C Program Files Manifold System Ext dll path to your file here Language Standard Set manboc manApp DocumentSet Open filePath True Application MessageBox Path to map file amp manDoc Path vbExclamation VBA Rocks End Sub Since we want to use Intellisense we have used the Option Explicit directive and declared the variables we will need specifying the specific data type Note that here we declared a specific variable Dim manApp As Manifold Application to hold a reference to the Manifold Application object which was not required in the VBScript environment The reason for that is if we just type Application what we will get in the IDE is Word Application not Manifold Application Dim filePath As String provides us a place to store text in this case the path to the document we are working on There are a wide variety of ways to find which file to open but here we will just hardcode
236. ied in code or as a drawing of area tiles and creating a Rect object to match your tile extents then using Map RenderAreaTo Rect to create the image tile 168 The second example here does something similar I can provide better examples if you need it and I think there are better ones on the archived site somewhere http www georeference org Forums tabid 71 forumid 7 postid 1711 view topic Default aspx thommy at 5 16 2006 10 15 PM 21229 Thanks very much Sometimes solutions are so banal but you don t find If you can post a better example would that me help Specially included with an example by iterating across the grid as a drawing of area tiles mdsumner at 5 17 2006 5 25 PM 21284 This one just uses a table and modifies the Rect object accordingly for each tile rather than obtaining it from an actual drawing tile Also it collects all the tiles in a folder and THEN exports them You d probably want to export the tiles as they are created and then delete them in turn VBScript not tested recently Sub Main Find the map its layout a grid centre Set Doc Application ActiveDocument speed me up Scotty Doc BatchUpdates True Set Comps Doc ComponentSet Asuming these components exist already Set Folder Comps Comps ItemByName Folder Set Map Comps Comps ItemByName Map this is a table of tile centre points and a column name Set Table Comps Comps ItemByName Grid Table
237. if set to True or just the open component if False en amp manComp Name en amp manComp Name en amp manComp Name 158 Func Dim Dim Dim Dim Dim Dim Dim Dim Set Set Sele Case R KKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKAKKKKKKK tion MetadataMandatoryRpt ByVal manComp eport manObjSet g E p S p P P P c S S sRptName Report AddText xml version 1 0 gt XSLT References pic eom Dim pixelSet ect arams sRptName As Manifold Point As Manifold Point r tMax tMin Max Min Application NewPoint Application NewPoint Case manComp TypeName Drawing Surface Image create metadata report manComp Name amp Metadata Report manDoc NewComments s Report Name ignore others eu Application StatusText Application StatusText amp amp vbCrLf k one to apply a format style to your XML file ESRI refernces only partially work as they require the either very href ht href h href ht Repor href ht ES ES ERIS Repor Repor Repor Repor Repor Repor Repor specfic FGDC tags or ESRI extensions THe FGDC STandard Format is recommened FGDC Standard Format public domain t AddText xml stylesheet type text xsl DC V2 xsl amp vbCrLf tp www fgdc gov FG RI Tabbed Dialog Report AddTex tp www fgdc gov m RI FAQ Fo
238. ifold installation directory e Select the two DLL s e Click Ok Manifold GeocodingServer VirtualEarth dll pe Manifold Interop Scripts dll Manifold Interop dll Files of type Component Files dil tlb olb ocx exe manifest 75 iy References Manifold Interop 2 Manifold Interop Scripts References will now show 4B stdole Manifold Interop System and l 3 System Data Manifold Interop Scripts 3 System Deployment 3 System Drawing 43 System Windows Forms 43 System Xml Adding the Manifold MapControl to the Toolbox k Pointer If the Manifold MapControl is not listed in the toolbox then ibaa gies e Right click in an open area of the md Toolbox ectorySearcher ErrorProvider e A lection box opens Reset Toolbox POPUP seme Pp z Diesen ARE Add Tab HelpProvider Delete Tab Click the 31 List CANT Pe Items zai MessageQueue Move Up lt 4 PerformanceCounter The menu below opens Lil Process Move Down Ghoose Toolbox Items NET Framework Components COM Components Select the Fu em COM Components C Launchctrl Class C Program Files Common Files Roxi UtilsUI 1 0 Type Tab O Link Bar C PROGRA 1 MICROS 2 Office10 F FPDTC 1 0 TYPE O List View C PROGRA 1 MICROS 2 Office10 F FPDTC 1 0 TYPE O ListPad class C WINDOWS System32 cic dll cic 1 0 Type Libr s ListView Class on bs Select the
239. ight Coordinates From Michael Sumner Sent December 11 2006 3 23 PM To Dr Harald von der Osten Cc Manifold L Subject Re Manifold I saving fly through trajectory gt http lists directionsmag com discussion read php f 29 amp i 42884 amp loc 0 amp t 42884 gt just an idea is it possible to save the x y z coordinates of the gt camera movement forced by striking the keys Q E to a file gt These trajectory could then be smoothed and could be the input for the gt flying through script That is not currently possible AFAIK You could do it in a slower more manual way by navigating as normal and then at each desired main point capture the current coordinates with a script and archive them Here s a basic example you would modify this to write the required values to a text component or table then manually step through your desired navigation running the script once each move process the trajectory and then input to the other script Sub Main Set Comps Document ComponentSet obtain active terrain window Set wSet Application WindowSet Set Win wSet ActiveWindow If Win Component Type ComponentTerrain Then 133 Application Messagebox Active window is not a terrain exiting Exit Sub End If get the current location Set pt Win Location or LocationLatLon if required mess append the data to a string mess mess amp point amp pt X amp a
240. in Application ActiveWindow Set MapWin Rect MapWin Bounds Set Pt Application NewPoint MapWin Rect Xmin MapWin Rect Set NewGeom Application NewGeom GeomPo Application MessageBox int Property amp VbTab amp VbTab amp Value amp VbCrlf amp Coordinate Sys amp VbTab amp CoordSy MinX amp VbTab VbTab amp MapWin Rec MaxX amp VbTab VbTab amp MapWin Rec MinY amp VbTab VbTab amp MapWin Rec MaxY amp VbTab VbTab amp MapWin Rec Width amp VbTab amp VbTab amp MapWin Re amp amp amp amp CentreX amp VbTab amp VbTab amp MapWin CentreY amp VbTab amp VbTab amp MapWin End Sub s Name Xmin Xmax Ymin Ymax ct ct ct cf amp amp amp amp amp ct Width VbCrLf VbCrLf VbCrLf VbCrLf VbCrLf gem m m amp amp VbCrLf Height amp VbTab amp VbTab amp MapWin Rect Height amp VbCrLf amp Ymin amp Rect Center X amp VbCrLf amp _ Rect Center Y Ck CK Ck ck Ck Ck CC Ck Ck SCC Ck Ck Ck CC Ck Ck Ck Ck Sk Ck ck Ck Ck Ck ck kk Ck kk Ck ck kk Ck Ck Ck ck kk Ck kk Sk ko Sk Kk kx Mk kv ko k ko ko ko ko 218 Miscellaneous Manifold Should NEVER Crash http forum manifold net Site Thread aspx id 22237 amp ti 632852579889430000 probio at 6 6 2006 8 48 PM 22238 I have got a script that imports a layer from a number of project files map about 10 and after importing will combine
241. inFlyThrough illustration of scripted terrain fly through Author Michael Sumner Date November 1 2004 Version 1 0 0 mdsumner utas edu au Platform Windows XP 2002 SP2 Manifold 6 0 SP1 Language VBScript Manifold System 127 SH db db HE HE Permission to use modify and distribute this code is hereby granted providing this entire comment section is included No warranty is expressed or implied Main name of drawing component to look for name Drawing name of column in drawing s table containing line heights THIS IS ASSUMED to exist htColumnName Height choose the z direction of the camera looking down a bit dZ 2 how high above the surface zOffset 0 the number of seconds to wait between each move use small values like 0 1 waitThisLong 0 Set doc Application ActiveDocument Set comps doc ComponentSet obtain active terrain window Set wset Application WindowSet Set win wset ActiveWindow If win Component Type lt gt ComponentTerrain Then msgbox Active window is not a terrain exiting Exit Sub End If obtain drawing containing the line segments dwgID comps ItemByName name If dwgID lt 0 Then msgbox No component named amp name End If Set dwg comps Item dwgID obtain the recordSet for the height values Set records dwg OwnedTable RecordSet obtain the line segments from the drawing Set dwgObjs dwg
242. inary ColumnTypeGeomWKB ColumnTypeLongitude ColumnTypeBoolean ColumnTypeInti16 ColumnTypePercentage ColumnTypeCoordSys ColumnTypeInt16U ColumnTypeTime ColumnTypeCurrency ColumnTypeInt32 ColumnTypeURL ColumnTypeFloat32 ColumnTypeInt32U ColumnTypeWChar ColumnTypeFloat64 ColumnTypeInt8 ColumnTypeWText Dim Comps Dim Source Tbl Source Cols Source Col Table Column Exists TRUE Set Comps Document ComponentSet Does the Component exist If Comps ItemByName Table Name lt 0 Then Application MessageBoxEX _ Component amp Table Name amp does not exist in the project Routine Table Column Exists _ MessageBoxTypeIconError OR MessageBoxTypeOk Table Column Exists False Exit Function End If Set Source Tbl Comps Item Table Name Is the Component a Table If Source Tbl Type ComponentTable Then Application MessageBoxEX _ Component amp Table Name amp is not a Table Routine Table Column Exists _ MessageBoxTypeIconError OR MessageBoxTypeOk Table Column Exists False Exit Function End If Set Source Cols Source Tbl ColumnSet Does the Column exist On Error Resume Next Set Source Col Source Cols Item Column Name If Err Then Application MessageBoxEX _ Table amp Table Name amp VbCrLf amp VbCrLf amp _ Column amp Column Name amp does not exist in the table Routine Table Column Exists _
243. inate system object to the document dwg CoordinateSystem coordSysNew doc BatchUpdates false End If End Sub Tweaking a Surface Coordinate System http 69 17 46 171 Site Thread aspx id 19866 amp ti 632792261502970000 You can tweak the coordinate system of the surface directly but be sure to isolate it from the original component they behave like pointers Rough and ready but this should get you going Sub Main Set doc Application ActiveDocument Set comps doc ComponentSet Set comp comps Drawing Set cs comp CoordinateSystem Set bbox comp ObjectSet Box xmin bbox Xmin 10 xmax bbox Xmax 10 ymin bbox Ymin 10 ymax bbox Ymax 10 stepX 20 stepY 20 117 nx round xmax xmin stepX Tod ny round ymax ymin stepY 1 Set surf doc NewSurface Surface nx ny ValueTypeFloat64 cs TRUE Set newCS surf CoordinateSystem newcs ParameterSet Item newcs ParameterSet ItemByName localOffsetX Value newcs ParameterSet Item newcs ParameterSet ItemByName localOffsetY Value newcs ParameterSet Item newcs ParameterSet ItemByName localScaleX Value stepX newcs ParameterSet Item newcs ParameterSet ItemByName localScaleY Value stepY Verifying the Coordinate System for a Large Number of Components Cannot retrieve the URL Many June and July 2006 postings seem to be lost at http lists directionsmag com discussion list php f 29
244. ing Set PointDrawing Comps Comps ItemByName IntersectionPoints Drawing Else Set PointDrawing Document NewDrawing IntersectionPoints Drawing Comp CoordinateSystem TRUE End If Set PointObjects PointDrawing ObjectSet Comment Intersections Clear For Counter 1 to NumberOfPoints Set aPt pts Item Counter 1 Center Comment Intersections AddText Point amp Counter amp X amp FormatNumber aPt X 15 1 amp Y amp FormatNumber aPt Y 15 1 amp vbcrlf Add a point at the intersection PointObjects Add Application NewGeom GeomPoint Application NewPoint aPt X aPt Y Next If Comment Intersections Text Then Application messagebox No Intersecting Lines Else Comment Intersections Open End If End Sub ELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLIL Private Function Component Exists ByVal ComponentName Dim Component Index Dim Components Set Components Application ActiveDocument ComponentSet Component Index Components ItemByName ComponentName If Component Index 0 Then Component Exists False 198 Else Component_Exists True End If End Function ELLLLILLILLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLELLLLLLLLL Sub ClearDrawing byRef ComponentName Dim Doc Comp Comps Dim Objs Counter This is a modified version of Mike Sumner s code obtained from http www georeference org Forums tabid 71 forumid A tpage 1 view topic postid 2
245. ing script it takes about 70 minutes Would someone look at the script below and let me know if I m doing something wrong or can otherwise provide insight on how to achieve a higher level of performance Note in my test the drawing being convertered is in lat long and I m converting it to Transverse Mercator NAD 1983 using the script 113 Thanks in advance for any help you guys can offer Option Explicit Sub Main Dim doc windows window dwg set doc Application ActiveDocument Set windows Application WindowSet ensure there is at least one opened window If windows Count 1 Then Exit Sub End If Set window windows ActiveWindow ensure active window contains drawing If window ActiveComponent Type ComponentDrawing Then Exit Sub End If set dwg window ActiveComponent Ensure input drawing is projected within proper coordinate system if dwg CoordinateSystem Name lt gt Transverse Mercator or _ dwg CoordinateSystem Datum Name lt gt North American 1983 mean for CONUS Then doc BatchUpdates true Init the new coordinate system dim coordSysNew Set coordSysNew Application NewCoordinateSystem Transverse Mercator coordSysNew Datum Application NewDatum North American 1983 mean for CONUS coordSysNew Unit Application NewUnit Meter coordSysNew Parameters centerLat Value 37 0 rough coordSysNew Parameters centerLon Value 95 0 rough Fire up a coordinat
246. ing the Current projection of each Image Save the Offset and Scale parameters which are good 110 Set Comps Document Componentset For Each Comp in Comps If Comp Type Comp Type Then Retrieve the CS and Parameters of the Image Set Comp CoodS Sys Comp CoordinateSystem Set Comp CoodSys Params Comp CoodSys Parameters Save the Offset and Scale from the imported projection LocalScaleX Comp CoodSys Params Item LocalScaleX Value LocalScaleY Comp CoodSys Params Item LocalScaleY Value LocalOffsetX Comp CoodSys Params Item LocalOffsetX Value LocalOffsetY Comp CoodSys Params Item LocalOffsetY Value Change the Current Projection of the Image to the desired one and respecify the original Scale and Offset Comp CoodSys Load NewProjection Comp CoodSys Datum Load NewDatum Comp CoodSys Params Item LocalScaleX Value LocalScaleX Comp CoodSys Params Item LocalScaleY Value LocalScaleY Comp CoodSys Params Item LocalOffsetX Value LocalOffsetX Comp CoodSys Params Item LocalOffsetY Value LocalOffsetY End If Next End Sub 1 Ck ck ck kk KK KK KK KK KK KK KK KK KK KK KK KK KK KK KC Kk x Applying a Lat Long Coordinate System to a Point http 69 17 46 171 Site Thread aspx id 17942 amp ti 632731991514300000 NOTE the code below has an error as the author states See fix at the bottom of the code LAK I m plotting a point from a
247. int PointSet Create new point object nDwg ObjectSet Add geom SET map Application ActiveDocument ComponentSet Map SET nLayer Application ActiveDocument NewLayer nDwg map LayerSet Add nLayer assign a custom colour to the tagging operation for Bomber nDwg PointBackground DefaultValue Formatting application NewColor Purple 255 0 255 nDwg PointForeground DefaultValue Formatting application NewColor Purple 255 0 255 END SUB VK KK ck ck ck ck Ck Sk C Ck Sk CC Ck SCC C Ck C Ck Ck Ck Ck Ck SC Sk CK Ck Sk Kk Sk Kk Sk Sk Sk Sk kk kv kx ko kv Mk ko ko k ck kokok 207 Map Components Find a Map Window Extents Center and Scale http 69 17 46 171 Site Thread aspx id 18137 amp ti 632736472 139800000 I can get the center and scale of a map window using Set MapWin Application ActiveWindow Set WinPt MapWin Location theScale MapWin Scale However if I don t know the width and height of the window I can t program the actual geographic extents of the window Does anyone know if it is possible to grab the extents of the current map window No but the map window always is smaller than the ApplicationWindow and this object has Width and Height So you can be sure that the following code will cover slightly more than the visible extend of the map window VBScript dx Application Width MapWin ScaleInternal 2 0 dy Application Height MapWin ScaleInternal 2 0 leftX WinPt X
248. inuous shading in the format dialog as the continuous values are not restricted to colors Nick Verge suggested continuous variation or perhaps one could have only continuous there it s all kind of values of course Copy the following lines into an XML file adapt the name of the column to your rotation data and load it in the thematic formatting dialog Then manually check continuous shading it s not saved with the theme Why not and you re prepared for all angles that might come xml theme lt type gt angle lt type gt lt interval gt true lt interval gt lt column gt Angle lt column gt lt angles gt lt angle gt 0 lt angle gt lt angle gt 360 lt angle gt lt angles gt lt angleMin gt 0 lt angleMin gt lt angleMax gt 360 lt angleMax gt lt angleDef gt 0 lt angleDef gt lt values gt lt value gt 0 00 lt value gt lt value gt 360 00 lt value gt lt values gt lt theme gt xml Custom Layout Templates http 69 17 46 171 Site Thread aspx id 26722 amp ti 63292885 1816070000 kgf at 8 30 2006 1 28 PM 26723 Hi all Can anyone help with custom templates I have layout templates working fine either from Apply File or from adding to the Config folder However the problem I have is that they seem to be bound to the name of the Map they were created from So if I create a template using Map and then apply a template to a layout attached to Map2 the template uses Mapl The workarou
249. ion VKKKKKKKKKKKKKKKKKKKKKKKKKKKK Ck Sk Sk Sk Kk Sk k ko ko ko ko kokok 100 Build a Form via VB net Code http forum manifold net Site Thread aspx id 20914 amp adamw on 5 10 2006 10 28 PM 20971 There are several ways of creating custom forms in Manifold 1 You can use form components This way you create a form component and insert the desired event handlers such as Button_Click into the attached script component This is only available for non NET scripts that is VBScript and JScript 2 You can use COM objects This way you create a COM object using the language and technology of your choice VC ATL VC MFC VC raw Win32 API VB 6 VB NET WindowsForms C WindowsForms anything else and call that COM object from within a script This is available for both non NET and NET scripts 3 You can use various system and third party libraries to build a form on the fly using code For example you can use WindowsForms to build forms in NET scripts Example VB NET Imports Manifold Interop Scripts Imports System Imports System Drawing Imports System Windows Forms Class Script Shared Sub Main Dim f As New MyForm f ShowDialog End Sub Class MyForm Inherits Form Public Sub New Dim b As New Button b Location New Point 20 20 b Text Say Hello AddHandler b Click AddressOf B Click Controls Add b Text My Form End Sub Private Sub B Click ByVal sende
250. ion Explicit PKK KKK KKK KKK KKK KKK KKK Ck ck KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK Sub Main Dim Comps Comp Tbl Dim Cols Col Dim Col Name Drwg Name Dim Ory Lorne Ketch Dec 11 2006 LKetch at hfx 1st dot eastlink 2nd dot ca For each Drawing Component in the Project Inserts a column named Name Fills that column with the Drawing Name NOT If the Drawing Name ends with Drawing that portion of the l name is deleted Example My Drawing becomes My My Drawing 2 will not be changed t Set Comps Document Componentset Make sure the Query component exists If Comps ItemByName Query lt 0 Then Set Ory Document NewQuery Query Else Set Ory Comps Item Query End If 306 For Each Comp in Comps If Comp Type ComponentDrawing Then Set Tbl Comp OwnedTable Set Cols Tbl ColumnSet Set Col Cols NewColumn Col Name Name Col Type ColumnTypeWText Cols Add Col Collect the column name just in case column Name already exists in the table and Manifold automatically changes the name Col Name Cols LastAdded Name If Len Comp Name gt 8 And uCase Right Comp Name 8 DRAWING T Drwg Name Left Comp Name Len Comp Name 8 Else Drwg Name Comp Name End If Ory Text Update amp Tbl Name amp Set amp Col Name amp amp Iason Ory RunEX TRUE End If Next En
251. ion Index example of using the application Status Bar Computes NDVI Normalized Difference Vegetation Index using Band and Band 2 and puts result into NDVI Displays computation progress in status bar Missing values are handled properly Band 1 and and 2 are parts of the AVHRR import Display Options for all three surfaces are set to render height with shading and autocontrast options turned off Computes NDVI Normalized Difference Vegetation Index using Band 1 and Band 2 and puts result into NDVI Sub Main obtain document and component set Dim document components Set document Application ActiveDocument Set components document ComponentSet obtain pixel sets from both bands and resulting surface Dim bandl bandlp band2 band2p ndvi ndvip Set bandl components components ItemByName Band 1 PixelSet Set band2 components components ItemByName Band 2 PixelSet Set ndvi components components ItemByName NDVI PixelSet collapse updates until the entire operation is complete document BatchUpdates True compute NDVI displaying progress messages in status bar For i 0 To ndvi Count 1 Set bandlp bandl i Set band2p band2 i Set ndvip ndvi i If bandlp IsMissing Then ndvip Mask 128 make pixel invisible ElseIf band2p IsMissing Then ndvip Mask 128 make pixel invisible Else ndvip Mask 0 make pixel visible ndvip Value CDbl band2p Value bandlp Value
252. itch them off I managed a way to do this I understand that my post wasn t too clear but i solved the problem Still thanks to all that viewed this post AndrT Coutinho Please report What s the solution Klaus To ensure that you only see the layers you want in the layers panel this can be used to stop the user from selecting unselecting certain layers you need to check if the layerItem the number of the layer is the one you want to show on the panel This way you keep the layers that shouldn t be selected unselected out of the layers panel code jscript temp tag to be replaced create layers pane if necessary for layerItem in layerList if layerList layerItem layerChck parameter layer layerSqno layerDefv if layerChck 179 layerChck checked this ensures we only see in the layers panel the layers we want if layerItem 1 layersC layersC lt input id layer layerSqno name layer layerSqno SN layerChck type checkbox gt encode layerList layerItem Mn layerSqnot t code temp tag to be replaced The problem I was having is that when I do this the layers that don t appear in the panel also disappear from the map The solution for that is to make those layers permanently on although they don t show on the panel that was my goal So I did this co
253. itude maps as well Update Tracks Set SystemSpeed kts Round ObjectLen obj nmi 6 0 0 1 Manifold requires a projected map or an SQL string that casts the Geoms to a projection I have tried both approaches Something like 64 Select Round Length Project Tracks 2004 Drawing Geom 1 COORDSYS Equidistant Conic nm 6 1 as Speed from Tracks Drawing I am finding that the numbers change depending upon which coordinate system is used Further none of the numbers match the old values calculated in Mapinfo Higher speeds can show considerable variation from the MI values Questions How is Manifold actually calculating these values Does the Length function use great circle distances Would this have something to do with a coordinate system being applied to a table of objects that span a large geographic area and each object using that default table system rather than one centered on the object Thanks Lorne Sent Tue 01 24 2006 10 38 AM To Manifold List From Adam Wachowski adamw manifold net Subject RE Manifold I Spherical Calculation of Distance and Area http lists directionsmag com discussion read php f 29 amp i 41405 amp t 41405 gt How is Manifold actually calculating these values It uses Euclidean formulae in the projection of the geom Thus converting the coordinates of a geom to another projection changes the length and area of the geom as well gt Does the Length f
254. ject where we had to compute the distances between a chicken coop and all locations where chicken manure was spread And rather than as the crow flies we had to do it as the tractor drives We then put the distances in a table Now why would we do such a thing Well chicken manure is really potent stuff and adds lots of nitrogen into the ground Most farmers when spreading it usually dump it off as close to the coop as possible so you should see higher nitrogen values there We were attempting to correlate N with distance from the coop Sub Main Set theActiveDoc Application ActiveDocument Set theCompSet Document ComponentSet Set Fields theCompSet Item chickens Set Roads theCompSet Item roads Set VC theCompSet Item Chicken Coop Set Analyz theActiveDoc NewAnalyzer Set theTable theCompSet Item Dists Set VCObj VC ObjectSet Item 0 Set PortObjSet Fields ObjectSet i 0 for each rec in Fields ObjectSet FieldName Fields OwnedTable RecordSet Item i Data ID2 i i 1 Set Spath Analyz SelectShortestPath Roads Roads ObjectSet rec VCObj if Spath Count 0 then thedist Spath GeomSet JoinLines Item 0 Length Application Messagebox FieldName amp amp thedist theTable RecordSet AddNew theTable RecordSet LastAdded Data NAME FieldName theTable RecordSet LastAdded Data dist thedist end if Next End Sub Iterating over the
255. ko ko ko kockok Find the Number of Days in any Month including Feb Leap Years Private Function MaxDaysInMonths ByRef Mon Yr NOTE Calls the IsLeapYear function which must also be available Mon 1 to 12 259 Yr required if Mon February Checks for Leap year If month February then just pass any number for the year L Ketch Dim DaysInMonth 11 DaysInMonth 0 31 DaysinMonth 1 28 DaysInMonth 2 DaysInMonth 3 30 DaysInMonth 4 31 DaysInMonth 5 DaysInMonth 6 31 DaysInMonth 7 31 DaysInMonth 8 DaysInMonth 9 31 DaysInMonth 10 30 DaysInMonth 1 If Mon 2 and IsLeapYear Yr Then ous IsLeapYear below DaysInMonth 1 29 End If MaxDaysInMonths DaysInMonth Mon 1 End Function 1 Ckok KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KK KKK KKK KKK ko A kx ko Is Year a Leap Year Private Function IsLeapYear ByVal Yr incl Else Multiples of 100 that are not also multiples of 400 are not leap years thus 1900 was not but 2000 was Original Source Woody s Office Watch March 25 1998 Vol 3 No 12 http office watch com office archtemplate asp v3 n12 If Yr 100 Or Yr 9999 Then 1 31 30 30 31 Application Messagebox The year provided must be between 100 and 9999 usive Exit Function End If If Yr Mod 400 0 Then IsLeapYear Tru ElseIf Yr Mod 100 0 Then IsLeapYe
256. l a GPX file or any XML format should be read using the official DTD gt XML Schema or DSD technology that is published and purports to describe the semantic gt structure of the XML data Having a schema for an XML file is not nearly enough to be able to read data within that file and make sense of it A schema can be used to validate the file that is given an XML file and a schema it can be easily determined whether or not the XML file conforms to the schema 321 However the application reading the XML file still has to parse individual tags within the file and somehow organize the resulting information even if it knows that the XML file conforms to a particular schema Let me provide an example Here is an XML lt xml version 1 0 encoding utf 8 gt x a xmlns xs http www w3 org 2001 XMLSchema xmlns xsi http www w3 org 2001 XMLSchema instance xmlns x urn data xsi schemaLocation urn data http server data xsd lt b gt 15 5 lt b gt c 28 0 c lt d gt 3 0 lt d gt x a Here is an XML schema lt xml version 1 0 encoding utf 8 lt xs schema targetNamespace urn data xmlns http tempuri org XMLSchema xsd xmlns xs http www w3 org 2001 XMLSchema gt lt xs element name a gt lt xs complexType gt xs sequence xs element name b type xs float lt xs element name c type xs float gt lt xs element name d type xs float gt lt xs seque
257. l objects etc in which case the IDs would regularly get changed why not base the loop on RecordSet Count Will The request is to sum a set of columns not a set of records Using IDs might not be the best choice since the user has no control over them If the column names use a specific pattern you could try something like VBScript sum 0 For i 1 To N Columni for column number 1 etc sum sum Record Data Column amp CStr i Next 302 If there is no pattern try VBScript names Array A B C sum 0 For i LBound names to UBound names sum sum Record Data names i Next Finding and Deleting Duplicate Records based upon Column Contents http 69 17 46 171 Site Thread aspx id 20092 amp ti 6328037205 15300000 NOTE 1 ColinD posted the original question on GeoReference Following is a summary of some of the responses NOTE 2 See Adam s SQL approach at the end Remove Duplicates when used on a Drawing removes Objects rows with identical geometries It doesn t care about the columns in the drawing it ignores them entirely and simply removes the most recently created objects KlausDE at 4 9 2006 1 55 AM 20326 You must get rid of the unique ID for the DISTINCTROW i e you cannot use nor select objects in the original Drawing The following script creates a query with all non intrinsic columns and excludes duplicates Delete the columns you don t need and link
258. lation based on the Burrough 1998 description allows user to define the size of the window nxn n odd number yersion 0 2 December 3rd 2003 abram pointet at epfl ch http lasig epfl ch VK KKK ck kk Ck ck Ck Ck C Ck Ck KK KKK KKK KKK Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck Ck Ck ck kk Ck Sk Sk ck kk kk kk Sk Sk Mk ko Mk kv ko k ko ko kockok 3X3 moving window description Y KKK KKKKKKKKKK Y 1 Z2 Z43 1 kkk A AA x x kk kk 1 4 75 7Zz6 1 kokoAk o Ck A A ck ck kk kk Y 7Z8 Zz9 Yo kokAk Ck A A kx kx kA kk VK KKK ck kk Ck Ck kk Ck Kk Ck Ck Ck KC Ck Ck Ck KK KKK KKK Ck Ck ck Ck Ck Ck Ck kk Ck Ck Ck ck Sk Ck kk Ck ck kk Ck kk ko Sk Sk Sk kx ko kv ko k ko ko ko ko 5X5 moving window description Y KKK CkCck ck ck ck ck ck ck ck k k k kkk Y x71 x72 73 1 kxk KK ck ckck ck ckck ck ck k ck ck kk Y kkk kK kk k xk xk 1 kkk Ckck ck ck ck ck ck ckck ck kck ck kk Y x74 75 76 VK KK KKK ck ck ck ck ckck ck k ck ck kk Ye ckck e OX RUE AO Xo Yo kkk Ckck ck ckck ko kckck ck k ck ck kk 1 x77 8 Zz9x 1 kkk Ck ck ckckck ck ckckck ck k ck ck kk Sub Main USER DEEFINED PARAMETERS set moving window parameter odd number windowsize int InputBox Enter window size odd integer Moving window size calculate slope If Application Messagebox Do you want to calculate the slopes vbYesNo
259. leValueCancel TableValueClear TableValueClearAll TableValueCopy TableValueCut TableValueDelete TableValueMore TableValueMoreLikeThis TableValueMoreLikeThisSorted TableValuePaste TableValuePasteAppend TableValueRunUnderDebugger TableViewBotAreas TableViewBotAverage TableViewBotBottom TableViewBotCenterMoment TableViewBotContaining TableViewBotContainingMatch TableViewBotContainingToken TableViewBotDuplicates TableViewBotDuplicatesExceptFirst TableViewBotEmpty TableViewBotEnding TableViewBotEndingWithMatch TableViewBotEndingWithToken TableViewBotEqual TableViewBotExcess TableViewBotGreater TableViewBotGreaterOrEqual TableViewBotLess TableViewBotLessOrEqual TableViewBotLines TableViewBotMatching TableViewBotMaximum TableViewBotMedian TableViewBotMinimum TableViewBotMoment TableViewBotNotEqual TableViewBotPoints TableViewBotRange TableViewBotRecords TableViewBotSizeEqual TableViewBotSizeGreaterOrEqual TableViewBotSizeGreter TableViewBotSizeLess TableViewBotSizeLessOrEqual TableViewBotSizeNotEqual TableViewBotSkew TableViewBotSounding TableViewBotStarting TableViewBotStarting WithMatch TableViewBotStarting WithToken TableViewBotStdDeviation TableViewBotSum TableViewBotTop TableViewBotTypical TableViewBotUniques TableViewBotVariance TerrainClouds TerrainFog TerrainLighting TerrainOpenSurface TerrainOverlay TerrainOverlayMoveDown TerrainOverlayMoveToBottom TerrainOverlayMoveToTop TerrainOverlayMoveUp Terrai
260. lication ActiveDocument NewLayer nDwg map LayerSet Add nLayer n n assign a custom colour to the tagging operation for Bomber Dwg PointBackground DefaultValue Formatting application NewColor black 0 0 0 Dwg PointForeground DefaultValue Formatting application NewColor black 0 0 0 END SUB VK KKK ck ck Ck Ck Ck Ck Ck Ck Ck KC Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck ck kk Ck kk Ck Ck kk kk Sk ko Sk Sk Sk ko ko ko ko ko ko ko ko SUB MUUMUU Ej Bj Bi Dd nn ca E HA HnANHN LastKnownPos get the coordinates of the last point in the line doc Application ActiveDocument comps doc ComponentSet comp comps Bomber PTT 52526 objSet comp ObjectSet HAHA H obj objSet 0 obj Type ObjectLine THEN branch obj Geom BranchSet Item 0 pts branch PointSet IF Set up a coordinate system and create a new drawing CS Application NewCoordinateSystem Latitude Longitude nDwg Application ActiveDocument NewDrawing End Bomber CS Zi E E hj Bd IOHA Ej Hj Hl pointset Application NewPointSet 206 SET point Application NewPoint Edit use pts Count method to set the x amp y coords for first point on line point X CDbl pts pts Count 1 x CDbl record data SGT Longitude point Y CDbl pts pts Count 1 y CDbl record data Latitude pointset Add point Create a new geometric entity SET geom Application NewGeom GeomPo
261. looking in the Manifold folder myFolder for components of type Drawing notice case as DXFs again notice case without export prompting drawing SHP yes This example will export all drawings in the current project as shapefiles to the current folder the last folder that used for import export prompting for shapefile options on each drawing Note For a more dynamic approach to component selection use a form containing a list box 1 Ck ck kk kk S S S S S kk Sk Sk Sk kk S Sk S Sk Sk Sk Sk kk kk kk kk kk kk x x x x x 166 Sub Main Set document Application ActiveDocument Set compSet document ComponentSet Set fso CreateObject Scripting FileSystemObject Get user values via input box entry InputBox Enter folder save location folder to export from amp component type to export export type prompt amp vbcrlf amp ex c NCtempN myFolder Drawing DXF no Generic Exporter c temp myFolder Drawing SHP no change this last string to change the default text in the prompt box this would be useful for settings that are used often Check if string is empty or Cancel is pressed exit if so If entry then Exit Sub End If Break inputBox string by commas into an array settings Split entry 1 1 check if folder path exists if not then create one subfolder below existing path If fso FolderExists settings 0 False Then S
262. ls Text dataRecord Data Long Long is a column in MyPosition Table This is done incorrectly above see note from Klaus below Labels Text dataRecord Data Long Long is a column in MyPosition Table For each object In theDrawing ObjectSet Labels LabelSet Add object object Geom 188 Next Labels Open End Sub Put a string into Labels Text exactly like you would do manually in the Label Edit Dialog Manifold evaluates this string for you and performs all the record fetching type conversions and string concatening Labels Text Long Adding Labels at x y Points to an Unbound Label Component http 69 17 46 171 Site Thread aspx id 20662 amp ti 6328 1674573 1870000 Specifically I want to read a text string with associated x and y co ordinate fields from a table and then place the text at the appropriate xy location in the unbound Label component Here s a piece of my code a mess I know and I ve forgotten how to bracket it Set labelGeom Application NewGeom labelGeom Branchset objectPoint set bset labelGeom Branchset Set labSet labelcomponent Labelset labSet Add 225 bset Two or three problems here 1 Don t use the name of a Constant objectPoint for a variable 2 Omit the brackets surrounding the parameters of the LabelSet Add function To be honest again and again I find this by trial and error running into the Syntax error You MUST assign a GeomType to
263. lues http forum manifold net Site Thread aspx id 33191 Save the following into a xml file in the Manifold Program Config directory 318 xml lt style gt lt name gt hourglass lt name gt lt type gt point lt type gt lt polygon gt lt point x 500 y 1000 gt lt point x 400 y 900 gt lt point x 500 y 800 gt lt point x 400 y 800 gt lt point x 400 y 600 gt lt point x 300 y 300 gt lt point x 100 y 100 gt point x 0 y 0 gt lt point x 100 y 100 gt lt point x 300 y 300 gt lt point x 400 y 600 gt lt point x 400 y 800 gt lt point x 500 y 800 gt lt point x 400 y 900 gt lt point x 500 y 1000 gt lt point x 500 y 1000 gt lt point x 400 y 900 gt lt point x 500 y 800 gt lt point x 400 y 800 gt lt point x 400 y 600 gt lt point x 300 y 300 gt lt point x 100 y 100 gt point x 0 y 0 gt lt point x 100 y 100 gt lt point x 300 y 300 gt lt point x 400 y 600 gt lt point x 400 y 800 gt lt point x 500 y 800 gt lt point x 400 y 900 gt lt point x 500 y 1000 gt lt polygon gt lt style gt lt xml gt Example Equal Interval Theme http 69 17 46 171 Site Thread aspx id 22795 amp ti 632901092226900000 319 Something to watch for using this method is that
264. make this mistake at first e this took 20min If we d done the same for a surface at 1m pixels the size would be gt 2Gb but I get the impression that it would have succeeded in doing so in 4X the time Next time I ll try to remember to have the scripts record the time taken And to set ActiveDocument BatchUpdates to TRUE JScript to import the separate surfaces 147 Note that I have a particular filter for the file names which are all the same but are kept in separate folders it only imports if the file name is w001001 adf Here you will need your own filter for particular files The adf importer will pull in any adf file as the entire surface for the ones I have This script will delve into the specified directory and all subdirectories to import files that fit the criteria code jscript temp tag to be replaced f NR RRR KK RK KKK KK KK KK KK KKK IR ORK KK OK KK OK ko kk ke koe ke k Author Michael D Sumner Date December 10 2003 Version 1 mikemiq yahoo com au Platform Manifold 5 5 SP2 Not tested on any other fF Language JavaScript Manifold System ie Permission to use modify and distribute this code is hereby granted providing this entire comment section is included No warranty is expressed or implied J NR RRR KKK KK RR KR KK KK KK RR KK KK RK OK KK kk OK kk ke ke k Ask user for starting folder and import it function Main caption Bat
265. meters Item 6 surface resolution resolution param Value R surface resolution Set surface pxset surface PixElset offset calculation offset windowsize 2 0 5 If offset tot cols 4 or offset tot rows 4 then Application Messagebox Window size exceding half domain Exit Sub End If set parent folder for new analysis surfaces Set document Application DocumentSet Item 0 Set folder document NewFolder surface name amp analysis false create new surfaces with the same characteristics as the dem 137 If cs true then Set slope document NewSurface surface name amp Slope amp windowsize amp x amp windowsize tot cols tot rows ValueTypeFloat64 surface coordsyst 0 slope Folder folder Set slope pxset slope PixElset End If If co true then Set orientation document NewSurface surface name amp Orientation amp windowsize amp x amp windowsize tot cols tot rows ValueTypeFloat64 surface coordsyst 0 orientation Folder folder Set orientation pxset orientation PixElset End If If cvc true then Set vertcurv document NewSurface surface name amp Vertical Curvature amp windowsize amp x amp windowsize tot cols tot rows ValueTypeFloat64 surface coordsyst 0 vertcurv Folder folder Set vertcurv pxset vertcurv PixElset End If If chc true then Set horcurv document NewSurface surface name amp Horizontal
266. mn gt gt Function DStudio gt DStudio distance Geom T NewPointLatLon 77 0770 38 9657 mi gt End Function You are using query functions in a script Try this Function DStudio Set p Application NewGeomFromTextWKT POINT 77 0770 38 9657 DStudio Record Object Geom Distance p 0 001 1609 in miles End Function Adam Wachowski L Ketch The Geom Method above is defined as 71 Number Distance Geom geom Number epsilon Returns distance to given entity measured over an ellipsoid Returned value is in meters The return value is in metres and Adam is using 1609 to convert to miles Adam has set epsilon to 0 00 1 metre Within the Manifold programming and mathematics team the location precision parameter is called the epsilon Some documentation and notes within sample source code may refer to the epsilon used for a given action This is the location precision distance referred to by a more mathematical name Active Column to Reference the Previous Record in a Table http forum manifold net Site Thread aspx id 3 1584 amp ti 633011039604370000 spoedniek on 12 7 2006 12 16 PM 31704 Not sure how much this will help but in jscript I access the previous record something like this JScript Prev An initial value declared and initialised outside the function which retains its value through iterations Var Prev 0 Function getPrevious Var valueToBeReturned Prev
267. mn Type ColumnTypeCurrency column Format Align ColumnAlignRight column Format Decimals 2 column Format Style S dollar column Format Width 100 columns Add column set tableCities document NewTable Sales by Cities Report Table columns set recordsCities tableCities RecordSet set recordNew recordsCities NewRecord create new comments set commentCities document NewComments Sales by Cities Report Text commentCities AddText Sales by Cities amp vbCRLF amp vbCRLF fill out new table and new comments for nItem 0 to records Count 1 set record records nItem recordNew Data City ID recordNew Data City Name recordNew Data Total record Data recordsCities Add recordNew nitem 1 record Data City Total v record Data City commentCities AddText v commentCities AddText v record Data Total commentCities AddText FormatCurrency CCur v commentCities AddText vbCRLF next tableCities Open commentCities Open 2 True remove temporary query set components document ComponentSet nItem components ItemByName Temporary Query Sales by Cities components Remove nItem End Sub Select Products by User Category Sub Main initializa set componen tion ts document ComponentSet 41 get category id nItem components ItemByName Categories set tableCategories compone
268. mp pt Y amp vbcrlf direction of camera may not be necessary depending on how you process the locations mess mess amp cameraDX amp Win CameraDX amp vbcrlf mess mess amp cameraDY amp Win CameraDY amp vbcrlf mess mess amp cameraDZ amp Win CameraDZ amp vbcrlf Application Messagebox mess End Sub HTH Mike From Frank O Donnell Sent December 12 2006 10 33 PM To manifold l lists directionsmag com Subject Manifold I Navigating within a 3D terrain view http lists directionsmag com discussion read php f 29 amp i 42895 amp loc 0 amp t 42895 when I open the terrain associated with the surface I find myself quite far away from the data I want to see The data is centered at approximately 33 44 109 N 118 24 095 W whereas when the 3D view initializes it always starts at 33 42 571 N 118 21 035 W I ve printed out the section Keyboard Navigation from the Manifold help file but no combination of strafing tilting rotation that I m finding is getting me toward the data in anything at a faster than glacial pace It would be convenient if I could say enter lat lon values to fly to immediately but I m also not seeing a way to do that So I have two questions First why does the 3D view initialize at that particular point relatively distant from the data I m wondering if perhaps that was the center of the larger set of surface data that I trimmed away In the deletion process I tol
269. n borderMargin 2 TilesObj Geom Box Width meters pica BoxHeight in borderMargin 2 TilesObj Geom Box Height meters pica With ManLE Border LayoutBorderCoordinatesGraticule BorderDegMinSec Tru BorderMargin 10 BorderRounding 3 Scope LayoutScopeBox ScopeArea TilesObj Geom Box ControlPoints LayoutStateOff Grid LayoutStateOff Legend LayoutStateOff NorthArrow LayoutStateOff ScaleBar LayoutStateOff Background LayoutStateOff Graticule LayoutStateOn MoveTo 0 0 BoxWidth BoxHeight End With TileIndex TileIndex 1 Next 192 application messagebox Layouts complete End Sub VK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko kokok Export Layouts code Sub Main turnOffGratBorder false set apptrans Application NewColor Trannie 0 0 1 set appblack Application NewColor Whitie 0 0 0 SET ManDoc Application activedocument set oExportPDF application NewExport PDF o o o o ExportPDF Compression False ExportPDF Resolution 400 ExportPDF VectorResolution 400 ExportPDF Transparency True SET ManComps ManDoc ComponentSet for each ManComp in ManComps if ManComp Type ComponentLayout then if ManComp Type ComponentLayout and ManComp Name CA005 then if turnoffGratBorder then For each vEntry in ManComp EntrySet With vEntry Graticule LayoutStateOff BorderColor apptra
270. n window Set wSet Application WindowSet Set Win wSet ActiveWindow If Win Component Type lt gt ComponentTerrain Then Application Messagebox Active window is not a terrain exiting Exit Sub End If obtain drawing containing the line segments DrwgID Comps ItemByName Drwg_ Name If DrwgID lt 0 Then Application Messagebox No component named amp Drwg Name End If Set Drwg Comps Item DrwgID Obtain the recordSet for the height values Set Rcrds Drwg OwnedTable RecordSet obtain the line segments from the drawing Set DrwgObjs Drwg ObjectSet 131 Iterate over all objects NumberOfObjs DrwgObjs Count For n 1 To NumberOfObjs Application StatusText Frame amp cStr n amp of amp cStr NumberOfObjs Set Obj DrwgObjs Item n 1 act only on line objects using first two points of first branch If Obj Type ObjectLine Then Set ptSet Obj Geom BranchSet Item 0 PointSet obtain the two points and calculate camera directions from the bearing from ptl to pt2 these range from 10 to 10 for all 3 dimensions not totally sure this is right but it seems fine Set Ptl ptSet 0 Set Pt2 ptSet 1 Bearing Ptl BearingTo Pt2 Win CameraDY Cos Bearing 10 Win CameraDX Sin Bearing 10 Win CameraDX Sin Bearing 180 10 Win CameraDZ dZ d HEHEHE HEE HHH HEHE EE EE EE EE HEE EEE EEE HH EE EE EE EE EE HE
271. nOverlayShowAll TerrainOverlayShowInverse TerrainOverlayShowNone TerrainSnapToSurface TerrainSurface TerrainWater ThemeOpenDrawing ThemeOpenTable ToolsAddinList ToolsAddins ToolsAddinsSelectAll ToolsAddinsSelectInverse ToolsAddinsSelectNone ToolsAdministratorConsole ToolsAdministratorConsoleColumns ToolsAdministratorConsoleGlobalFilter ToolsAdministratorConsoleProperties ToolsAdministratorConsoleRefresh ToolsAdministratorConsoleRun ToolsAdministratorConsoleTriggers ToolsBatchExport ToolsCustomize ToolsDatabaseConsole ToolsDatabaseConsoleComponentView ToolsDatabaseConsoleGlobalFilter ToolsDatabaseConsoleImport ToolsDatabaseConsoleImportQuery ToolsDatabaseConsoleLink ToolsDatabaseConsoleLinkQuery ToolsDatabaseConsoleRefresh ToolsDatabaseConsoleRun ToolsMakeImage ToolsOptions ToolsOptionsPalettesSave ToolsServerConsole ToolsServerConsoleAddFolder ToolsServerConsoleDelete ToolsServerConsoleImport ToolsServerConsoleLink ToolsServerConsoleRefresh ToolsServerConsoleUndoCheckOut ViewCallStack ViewCallStackGoTo ViewCallStackShowLanguage ViewCallStackShowLine ViewCallStackShowLinePosition ViewCallStackShowModule ViewColumns ViewColumnsMoveDown ViewColumnsMoveToBottom ViewColumnsMoveToTop ViewColumnsMoveUp ViewColumnsShowAIl ViewColumnsShowlInverse ViewColumnsShowNone ViewControlPoints ViewControlPointsAdd ViewControlPointsAddBlank ViewControlPointsDelete ViewControlPointsLoad ViewControlPointsLoadFromFile ViewControlPoi
272. nProjection EditBookmarkNext EditBookmarkPrevious EditBookmarkToggle EditBookmarksDeleteAll EditBreakpointNext EditBreakpointPrevious EditBreakpointToggle EditBreakpointsDeleteAll EditCenterHorizontally EditCenterVertically EditChangeProjection EditCommentSelection EditCompleteWord EditCompleteWordWithList EditCopy EditCreateAreas EditCreateLines EditCreatePoints EditCut EditDelete EditDeleteAll EditDeleteInLayers EditFind EditFindNext EditFormatApply EditFormatAreaBackground EditFormatAreaBorderBackground EditFormatAreaBorderForeground EditFormatAreaBorderSize EditFormatAreaBorderStyle EditFormatAreaForeground EditFormatAreaSize EditFormatAreaStyle EditFormatBrushBackground EditFormatBrushForeground EditFormatBrushSize EditFormatBrushStyle EditFormatDarken EditFormatElementBackground EditFormatElementFont EditFormatElementFontBold EditFormatElementFontltalic EditFormatElementFontSize EditFormatElementFontStrikeout EditFormatElementFontUnderline EditFormatElementForeground EditFormatElementRotation EditFormatElementTextAlignBottom EditFormatElementTextAlignLeft EditFormatElementTextAlignRight EditFormatElementTextAlignTop EditFormatElementTextCenterHorizontally EditFormatElementTextCenterVertically EditFormatElementTextJustify EditFormatGrayscale EditFormatInterpolate EditFormatLabelAlignBottom EditFormatLabelAlignLeft EditFormatLabelAlignRight EditFormatLabelAlignTop EditFormatLabelBackground EditForm
273. nce gt lt xs complexType gt lt xs element gt lt xs schema gt The XML conforms to the schema you can take my word for it Now armed with that knowledge can you tell me what is the meaning of the numeric values inside the XML How do you want Manifold to import these values Should Manifold create a table with three columns containing the values of 15 5 28 0 and 3 0 Or should it create a drawing with a point at 15 5 28 0 and a column value of 3 0 Or should it create a drawing with a circle centered at 15 5 28 0 with a radius of 3 0 Of course there is no way to tell The schema does not contain this kind of information An XML schema does not describe the semantics of the XML subformat it validates Having a schema is not a substitute for having the format documentation While it is possible to write code that would read an XML file without any prior knowledge about the contents of that file except that it conforms to some schema which is determined dynamically in the process of importing the file or is not backed up by the format documentation this code will be much too generic to be useful It would be easy to import a GPX file as a comments component but this is not what you want right 322 Adam Wachowski Rotating Symbols on a Continuous Scale http forum manifold net Site Thread aspx id 30442 amp ti 632995763476730000 KlausDE on 11 19 2006 11 39 PM 30526 Seems high time for rephrasing of cont
274. nd It is common for Manifold programmers to obtain the Index of a new component pasted from the clipboard by using the Count property of the ComponentSet in the manner shown below In this example both the Drawing and its associated table will be pasted in that order and we must subtract 2 from the ComponentSet Count property Drwg Copy TRUE Document PasteAs ComponentDrawing Set New Drawing Comps Item Comps Count 2 There is no guarantee that ComponentSet Count 2 will reference the correct component Index although it generally does In a GeoReference thread from June 9 2006 adamw at 6 9 2006 7 53 AM 22465 Adam provided a general outline for solving this problem One of the possible ways to locate the components created by the paste operation which can create several components is to save the IDs of all existing components prior to doing the paste and locate the new components after the paste see http 69 17 46 171 Site Thread aspx id 22339 amp ti 632854363953230000 This Function attempts to implement that solution Do NOT use coding such as Component Copy Document PasteAs ComponentDrawing 245 Dim Dim Dim Dim Dim Dim Msg i Set NewDrawing USE this instead New_Index If New Index Exit Sub Else Duplicate FALSE T Set NewComp End If Comps Comp Index New ID IDs BeforePas Count BeforePaste Ory te Comps Item
275. nd is to create a layout using default name Map each time but is there a way to edit the 323 xml file to make the layout refer to the active Map rather than the name of the Map the template was created with Thanks Use layouts bound to components and use lt body gt instead of lt component name gt Thanks very much I changed lt component background auto border thin to lt body background auto border thin and all seems to work now VB NET Reader for XML Units File David M Brubacher OLS OLIP 11 24 2003 3 55 AM http www georeference org Forums tabid 71 forumid 3 tpage 1 view topic postid 124 Default aspx 1 80 Here is a small console application that reads the above XML and dumps each unit to screen Module ListUnits Application start point Sub Main Dim reader As XmlReader Try change the path to suit your system reader New XmlTextReader c NdocumentsNunits xml Dim unitName As String Dim unitScale As Double read through XML file While reader Read start reading new unit If reader NodeType XmlNodeType Element And reader Name unit Then unitName unitScale 0 accept unit name ElseIf reader NodeType XmlNodeType Element And reader Name name Then unitName reader ReadString 324 accept unit scale ElseIf reader NodeType XmlNodeType Element And reader Name scale Then unitScale Double Parse reader ReadStri
276. nd set its View Projection to Orthographic 2 Use Center Point tool to recentre the map 3 Click Run Script with the script component highlighted in the Project Pane 4 Repeat from 2 Option Explicit Sub Main Dim Win Map vParams Pt Set Win Application WindowSet ActiveWindow If Win Component Type lt gt ComponentMap Then Exit Sub Set Map Win Component Set vParams Map CoordinateSystem Parameters Set Pt Win LocationLatLon vParams Item vParams ItemByName CenterLat Value Pt Y vParams Item vParams ItemByName CenterLon Value Pt X End Sub Reassign Component Coordinate System amp Datum keep Original Scales amp Offsets 1 Ckokckck ck ck kk ck kk Ck Ck Ck Ck Ck Kk Ck Ck Ck kk Ck Ck Sk Ck kk Ck ck kk Ck kk ck ck kk Ck kk ck ck kk kk kk ko Kk Sk kx kx kv ko ko ko ko ko Author Michael D Sumner Date December 10 2003 Version 1 0 1 XXXX Platform Manifold 5 5 SP2 Not tested on any other Language VBScript Manifold System Permission to use modify and distribute this code is hereby granted providing this 109 entire comment section is included No warranty is expressed or implied 1 ck ck ck ck ck ck Ck ck Sk Ck Ck Ck Ck Ck Ck ck Ck Sk Ck ck Cc ck kk ck kk kk ck ck kk kk ck kk ck ck ck kk ck kk ck ko Sk Mk kA k ko ko ko ko kock ko mdSumner provided some extra input to Bcowper on Sep 7 2006 to convert the code to process Images os GeoReference Thread
277. ndCross diamondCrossX diamondDot diamondDouble diamondF diamondFDark diamondFDarkRev diamondFull diamondG diamondGDark diamondGDarkRev diamondH diamondLDark diamondRDark diamondSpot diamondTDark diamondV digit digit digit2 digit3 digit4 digit5 digit6 digit7 digit8 digit9 dollar dong drachma euro flagRect flagRectWipe flagTriangle frank guideB guideL guideLB guideLT guideR guideRB guideRT guideT kip letterA letterB letterC letterD letterE letterF letterG letterH letter letterJ letterK letterL letterM letterN letterO letterP letterQ letterR letterS letterT letterU letterV letterW letterX letterY letterZ lira mill naira peseta pound rupee sheqel tree triangle triangleDot triangleDouble triangleFull triangleLDark triangleRDark triangleRev triangleRevDot triangleRevDouble triangleRevFull triangleRevLDark triangleRevRDark triangleRevSpot triangleRevV triangleSpot triangleV tShape tShapeRev tugrik value wind Wingdings 033 Wingdings 034 Wingdings 035 Wingdings 036 Wingdings 037 Wingdings 038 Wingdings 039 Wingdings 040 Wingdings 041 Wingdings 042 Wingdings 043 Wingdings 044 Wingdings 045 Wingdings 046 Wingdings 047 Wingdings 048 Wingdings 049 Wingdings 050 Wingdings 051 280 Wingdings 052 Wingdings 053 Wingdings 054 Wingdings 055 Wingdings 056 Wingdings 057 Wingdings 058 Wingdings 059 Wingdings 060 Wingdings 061 Wingdings 062 Wing
278. ndex Cols Index Name End If Case 3 ID Regular Columns Intrinsics ALL Column Index Column Index 1 Column List Column Index Cols Index Name Case 4 Intrinsics Only If Cols Index IsIntrinsic Then Column Index Column Index 1 Column List Column Index Cols Index Name End If Case 5 ID Only Provided for completeness only It would be better to have a stand alone function to 310 return this single value since we must pass a dynamic array to this function No Optional parametres in VBscript See Function Identity Column Name If Cols Index Identity Then Column Index Column Index 1 Column List Column Index Cols Index Name We can get out since we only require one Column name ReDim Preserve Column List Column Index Exit Function End If End Select Next ReDim Preserve Column List Column Index If Sort Then If Descending Then BubbleSort uCaseText Column List TRUE Else BubbleSort uCaseText Column List FALSI End If End If GI End Function 1 Ckok KKK KKK KK KKK KKK KKK KKK KKK KK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko ko Trim all Text Columns in a Table A simpler form of this routine was posted at http forum manifold net Site Thread aspx id 282 18 amp ti 632967693061 100000 Option Explicit Y KKKKKKKKKKKKKKKK CI CIC CIC KC CK CK CK CIC IGI
279. needed and rerun gt This is also a powerful learning tool as one can see the command gt sequence that was actually used and can build on reuse this gt information Just dreaming my old DOS database system had this and gt it was very useful As it has been mentioned by others this is already in the wishlist If you want to stress the importance of having this feature in the system email sales manifold net Adam Wachowski Change Projections to Lat Long no offsets http 69 17 46 171 Site Thread aspx id 2445 1 amp ti 632890871527770000 antoniocarlos at 7 19 2006 8 01 AM 24556 1 there a script that takes all the drawings in a project and changes their projections to lat long with no offsets of any kind so that this problem does not occur Why does Manifold use offsets rather than keep the coordinates as intrinsics Regards adamw at 7 19 2006 9 32 AM 24577 Here you go VBScript Sub Main For Each c In Document ComponentSet If c Type ComponentDrawing Then c ProjectTo Application DefaultCoordinateSystemLatLon End If Next End Sub All programs use offsets and scales it is just that Manifold exposes them as part of the coordinate system Other programs keep offsets and scales separate from the coordinate system a world file vs a PRJ file 105 XL VBA Create a Components Projection Report http 69 17 46 171 Site Thread aspx id 166 amp ti 6320795 15400000000 Code developed under
280. ng finish reading unit ElseIf reader NodeType XmlNodeType EndElement And reader Name unit Then Console WriteLine O 1 unitName unitScale End If End While Finally reader Close End Try End Sub 325
281. nipulate the object In the second line document is an object and its collection of Components ComponentSet is being assign to the variable components Collections are multiple instances of objects Objects within collections can be accessed via an index number and often via name The third line displays the number of components in your project by using the Count property of the ComponentSet collection that was stored in the variable components The forth line extracts a reference to the drawing component we want to work with by using its name The last line displays the component s type and name by using the Components TypeName and Name properties Referencing the Active Component Window via Scripts Getting access to a component by its name is interesting but in practice you don t know the name of the drawing s you will be working with More likely you will want the script to operate upon the component the has the focus in the main Manifold window obtained via the ActiveWindow property in scripts The component with the focus will have a title bar that is brighter than the rest If the active window is a map you d like the script to operate on the active layer within the map Here is some code to get a reference to the component that has the focus This script will also check to see if the component is of the correct type for this script and complains if it isn t Sub Maken Set document Application ActiveDocumen
282. not map one to one to NET entities so sometimes the tool has to do something creative to make sure that the generated NET module can do everything that would be possible to do via COM When a COM entity maps to a NET class the tool makes sure the methods and properties generated from the type library do not shadow the methods and properties of the parent class Thus it renames any methods named ToString since each NET object inherits from System Object and System Object already has a method named ToString It turns out that sometimes the tool renames a method or property even if there are no apparent naming conflicts like in this particular case the Document property I do not know why exactly it does this but one theory is that it does this in anticipation of future changes to the NET Framework Manifold Object Model in VB 2005 http forum manifold net Site Thread aspx id 3 1261 amp ti 633008396463230000 gxdata on 12 4 2006 8 07 AM 31456 Within Visual Studio e Once you have set a reference in VS2005 to Manifold Interop you have IntelliSense kicking in to help you like other objects referenced within the VS IDE That is very helpful e tis possible to use the Object Browser panel within Visual Studio and have a look at the object model that way If you understand the rudiments of working within Visual Studio it really is worthwhile trying some fairly simple things there and then if it is a better way to achieve what you
283. ns End With Next end if with oExportPDF PageFilter 1 Export ManComp C STWork BayVectors ManComp Name A pdf PromptNone PageFilter 2 Export ManComp C STWork BayVectors ManComp Name B pdf PromptNone end with if turnOffGratBorder then For each vEntry in ManComp EntrySet With vEntry Graticule LayoutStateOn BorderColor appblack End With Nex end if end if Next application messagebox Processing Complete end sub 193 Custom Layout Templates http 69 17 46 171 Site Thread aspx id 26722 amp ti 63292885 1816070000 Hi all Can anyone help with custom templates I have layout templates working fine either from Apply File or from adding to the Config folder However the problem I have is that they seem to be bound to the name of the Map they were created from So if I create a template using Map and then apply a template to a layout attached to Map2 the template uses Mapl The workaround is to create a layout using default name Map each time but is there a way to edit the xml file to make the layout refer to the active Map rather than the name of the Map the template was created with Thanks Use layouts bound to components and use lt body gt instead of lt component name gt Thanks very much I changed lt component background auto border thin to lt body background auto border thin and all seems to work now 1
284. nsCategories Add columnProductsMap thanks Will I was hoping there was something easier I have like 7 different columns to add And sometimes I don t necessarily know what each of the column names are beforehand I put in a request to Manifold hoping there would be something like a RelateAII RelateSome RelateNone option I don t like the current way its being done thanks again Some refactoring could give you a generic Sub like the one below Then you could loop though your ColumnSet and use column properties like IsIntrinsic to filter out unwanted columns 301 to keep inline with the earlier example it would be called like this addRelCol columnsProducts columnsCategories Product Name Sub addRelCol sourceColSet targetColSet colName set colMap targetColSet NewColumn colSrc sourceColSet ItemByName colName colMap Name colName colMap OriginColumn sourceColSet Item colSrc targetColSet Add colMap End Sub Access Column Data by Index Rather than Column Name http 69 17 46 171 Site Thread aspx id 18333 amp ti 63274198949 1870000 You can access data by column index i e Record Data Number ID and you could sum data in a loop For ID 4 to 17 sum sum Record Data ID next id This would speed up your coding at the cost of slowing down the calculation of the active column Klaus That might still be a bit cumbersome if the drawing is worked on transforms additiona
285. nsmag com Subject Manifold 1 Finding the bad apple I have a map I have been adding stuff to for a couple of weeks All of a sudden things have slowed down a lot My guess is that one of those layers has an odd projection In my understand In order to find the bad apple I have to find each of those layers in the project mnanager and check its projection Is there any other quicker way it would be cool to be able to put up a table that would list projections of each layer One could have a button that would change all layers to a selected projection but that is a bit drastic when you don t know which one might need specific projection attention David J Weinschrott PhD Sent Fri 04 07 2006 10 06 AM To manifold l lists directionsmag com Subject RE Manifold 1 Finding the bad apple gt it would be cool to be able to put up a table that would list projections of each layer 211 Here is what you could do Create a table named Data with a text column named Name Open the tabl and add a record for each component you are interested in Create a new query and set its text to SELECT Name CoordSys Name AS COMPONENT CoordSys INTO CoordSystems FROM Data Run the query Open the resulting table Right click the CoordSys column select Format set formatting style to XML and click OK Resize the column You should see the name of the coordinate
286. nt ObjectSet TotalRecords Records Count Prog Progress Min 0 Prog Progress Max TotalRecords 1 SBar ProgressReport Panels 2 Text cStr TotalRecords amp Records in HRUDAT For RecordCounter 0 to TotalRecords 1 Set Record Records RecordCounter Set Obj Objs Objs ItemByID Record Data ID OR Set Obj Objs Item RecordCounter Metres to Nautical Miles conversion factor 0 000539594075 Length nm Obj Geom Length 0 000539594075 Speed Round Length nm 6 0 1 Record Data SysSpd Manifold Speed Tf RecordCounter 1 Mod 100 0 Then DO NOT update the bars too often Doing so will bog down code exection SBar ProgressReport Panels 1 Text cStr RecordCounter 1 Prog Progress Value RecordCounter End IF 222 Next Form Visible False End Sub VK KK KKKKKKKKKKKKKKKKKKKKK KK KK KK KK KKK KKK KKK KKK KKK KK KK ko ko ko ko k ko k k kk Create a Component at the Root Level Not in an Existing Folder http 69 17 46 171 Site Thread aspx id 18274 amp ti 632738929572000000 I am trying to generate a new Table object in a script using the command table doc NewTable MEMORY columnSet false I am experiencing the following problem My script is in a Scripts folder When the script is run it creates the Table in the Scripts folder as well I would like the Table to be generated in the root of the document I c
287. nt may in fact delete a number of linked components First collect the names of the compenents to delete then do the actual deletions by component name If the name no longer exists we can just ignore it ReDim Components2Delete 100 Index 1 257 For Each Comp in Comps Comp Name uCase Comp Name Or If regEX WO test Comp Name TRUI 8 Then regEX WT test Comp Name TRU Index Index 1 If Index gt uBound Components2Delete Then s E EH ReDim Preserve Components2Delete uBound Components2Delete 100 End If Components2Delete Index Comp Name End If Next LastIndex Index For Index 0 to LastIndex Delete Component Components2Delete Index Next End Sub VK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK kx ko ko kock ko kock Private Sub Delete Component ComponentName Dim Component Index Dim Comps Set Comps Document ComponentSet Component Index Comps ItemByName ComponentName If Component Index 0 Then Exit Sub Comps Remove Component Index End Sub Yo kkxkxkxkxkxkxkkxkkxkxkxkkkkxkkkkkkkkkkkkkkkkkkxkkkkkkxkkkkxkkkkkkkkkkxkxkkkxkkxkkkkkkkkkkkxkxx k Get the Last Token in a String in Proper case Private Function Get_Last_Token ByVal Str ByVal ParseChar Dim Ptr Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca Ptr InStrRev Str ParseChar If Ptr lt 1 Then P
288. nts Item nItem set recordsCategories tableCategories RecordSet category Application InputBox Enter category name Select Products of User Category Seafood If category Then Exit Sub End If nItem recordsCategories ItemByValue Category Name category set record recordsCategories Item nItem value record Data Category ID reset selection in Products table nItem components ItemByName Products set tableProducts components Item nItem set recordsProducts tableProducts RecordSet For nitem 0 To recordsProducts Count 1 Set record recordsProducts nItem record Mask record Mask And Not 1 Next select products with selected category Set selections recordsProducts EqualTo Category ID value For nItem 0 To selections Count 1 Set record selections nItem record Mask record Mask Or 1 Next tableProducts Open End Sub Select Young Yet Experienced Employee Sub Main initialization set components document ComponentSet nItem components ItemByName Employees set table components Item nItem set columns table ColumnSet set column columns NewColumn set records table RecordSet set atoms table DSSAtomSet set entries column DSSQuery create Young atom nItem columns ItemByName Birth Date set columnBirthDate columns Item nItem set atomYoung atoms NewDSSAtom atomYoung Name Young atomYoung Column
289. nts ItemByName Vatican Image Chick set up coordinate converter S Set SystemImage Image CoordinateSystem Set SystemDrawing Drawing CoordinateSystem Set Converter Application NewCoordinateConverter Converter Prepare SystemImage SystemDrawing Set Point Application NewPoint Set Pixels Image PixelSet Set SelectedObjects Drawing Selection batch updates for performance Document BatchUpdates True traverse image pixels modifying selection state as necessary For Index 0 To Pixels Count 1 If Index Mod 100 0 Then Application StatusText CStr Index of CStr Pixels Count pixels End If Set Pixel Pixels Index deselect pixel 56 Pixel Mask Pixel Mask And Not 1 send pixel coordinates to geometric entity taking care of inverse Y direction Point X Pixel X Point Y Image Height Pixel Y 1 Set PointGeom Application NewGeom GeomPoint Point convert pixel coordinates to drawing Converter Convert PointGeom loop through selected objects within drawing to check if there s one that contains pixel For IndexObj 0 To SelectedObjects Count 1 Set Object SelectedObjects Item IndexObj If Object Geom Distance PointGeom 50 Then Pixel Mask Pixel Mask Or 1 Exit For End If Nex Next process batched updates Document BatchUpdates False Application StatusText End Sub Capturing Sreenshots of the Active Com
290. ntsNative ViewControlPointsPreview ViewControlPointsRegister ViewControlPointsSave ViewControlPointsSaveToFile ViewControlPointsShowNames ViewDisplayOptionsElevation ViewDisplayOptionsImage ViewDisplayOptionsLabels ViewDisplayOptionsProfile ViewDisplayOptionsSurface ViewDisplayOptionsSurfaceApply ViewDisplayOptionsSurfaceDarken ViewDisplayOptionsSurfaceGrayscale ViewDisplayOptionsSurfaceInterpolate 273 ViewDisplayOptionsSurfaceLighten ViewDisplayOptionsSurfaceLoadFromFile ViewDisplayOptionsSurfaceReverse ViewDisplayOptionsSurfaceSaveToFile ViewErrors ViewErrorsGoTo ViewErrorsShowLine ViewErrorsShowLinePosition ViewErrorsShowModule ViewFilterSelection ViewFullScreen ViewGoBack ViewGoForward ViewGpsConsole ViewGpsConsoleConnect ViewGpsConsoleDownloadWaypoints ViewGpsConsoleProperties ViewGpsConsoleTrack ViewGpsConsoleTrackCenter ViewGpsConsoleTrackColumns ViewGpsConsoleTrackLine ViewGpsConsoleTrackPoints ViewGpsConsoleTrackSequence ViewGpsConsoleUploadWaypoints ViewGraticule ViewGrid ViewHistory ViewHistoryClear ViewHistoryCopy ViewHistoryFreeze ViewHistoryPrint ViewHistorySaveToFile ViewInfo ViewInfoCenter ViewInfoFilterSelection ViewInfoGoFirst ViewInfoGoLast ViewInfoGoNext ViewInfoGoPrevious ViewInfoPing ViewInfoShowBlanks ViewInfoShowIntrinsics ViewInfoShowTypes ViewInfoZoom ViewLayers ViewLayersDelete ViewLayersHideAll ViewLayersMoveDown ViewLayersMoveToBottom ViewLayersMoveToTop ViewLayersMoveU
291. nv Application NewCoordinateConverter cnv Prepare drw srf 143 find out height for each point For Each obj In drw ObjectSet If obj Type ObjectPoint Then Set pt obj Geom BranchSet 0 PointSet 0 cnv Convert pt WARNING check if pt is out of surface Set px srf PixelSet srf PixelSet ItemByXY pt X srf Height pt Y 1 Application MessageBox obj ID amp amp px Value End If Next End Sub Thanks Adam That seems to work although some values were off a bit as compared to the values from Transfer Height function They are very close So when you convert the drawing coordinate system to the same one as in the surface do the point coordinates pt X pt Y in the drawing equate to the pixel X Offset I and Y Offset I of the surface I m trying to understand the intrinsic fields of the surface Hung 2004 04 28 8 41 AM So when you convert the drawing coordinate system to the same one as in the surface do the point coordinates pt X pt Y in the drawing equate to the pixel X Offset I and Y Offset 1 of the surface It is slightly more complicated than that The coordinate system of the surface is X I and Y I however the ItemByXY method of the PixelSet object accepts the equivalents of X Offset I and Y Offset I 144 Calculating Hillshade from a DEM http forum manifold net Site Thread aspx id 3 1964 amp ti 633016799144170000 OK another obscure raster
292. o ko ko ko ko t Coordinates umber umber imals Ketch use modify and distribute this code is granted 296 provided that you cite the original author Email LkKetch at hfx dot eastlink ca Dim X Str Y Str Dim Decimal Position Dim MaxX Str Length MaxY Str Length Dim Str Length Dim Padding MaxX Str Length cLng MaxX WholeNumber NumberOfDecimals 1 MaxY Str Length cLng MaxY WholeNumber NumberOfDecimals 1 DO THE X X FormatNumber X NumberOfDecimals 1 Str Length Len X Padding If Str Length MaxX Str Length Then Padding String MaxX Str Length Str Length 32 End If X Str X amp Padding amp X DO THE Y Y FormatNumber Y NumberOfDecimals 1 Str Length Len Y Padding If Str Length MaxY Str Length Then Padding String MaxY Str Length Str Length 32 End If Y Str Y amp Padding amp Y Format Coordinates X Str amp amp Y Str End Function 1 Ckokckck ck ck ck Ck Ck Ck Ck Ck Sk Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck kk Ck Ck kk Ck Ck Ck Ck kk Ck Ck Sk Ck kk Sk Sk kk kx Sk kv ko kx Mk ko ko ko Private Function Get Coord WholeNumber MaxStrLength _ ByRef Drwg _ ByRef MaxX WholeNumber ByRef MaxY WholeNumber Author Lorne Ketch Permission to use modify and distribute this code is granted provided that you cite the original author Email Ketch at hfx dot eastlink ca
293. ocalScaleX params localScaleY localScaleY params localOffsetX localOffsetX params localOffsetY localOffsetY End If End Sub desired on 150 code temp tag to be replaced VBScript to merge all surfaces to one Note that this assumes you have created a single surface Merged that covers the extent of all surfaces and is at least close in pixel size However it doesn t have to have this constraint the paste will resize Merged and resample the pixels of the copied surface appropriately as far as the Confirm expanding images or surfaces when pasting option in Tools Options Confirmations is turned on thanks AdamW but there is only so much it can do it will be impossible to resize above a certain size and performance is much better if resampling and resizing is not necessary code temp tag to be replaced TKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK kx kv ko ko ko ko ko Author Michael D Sumner Date December 10 2003 Version 1 0 1 mikemiq yahoo com au Platform Manifold 5 5 SP2 Not tested on any other Language VBScript Manifold System Permission to use modify and distribute this code is hereby granted providing this entire comment section is included No warranty is expressed or implied Yo Ck ck kk Ck CK Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck ck Ck Ck Ck Ck kk Ck kk Sk Ck kk ko Sk Sk ko Sk Sk Sk ko ko kv ko ko ko ko ko Sub Main Set
294. of the component types Thanks again Lorne There is never such a guarantee 187 One of the possible ways to locate the components created by the paste operation which can create several components is to save the IDs of all existing components prior to doing the paste and locate the new components after the paste Of course this is too much code for something that has to be done so frequently so things will likely improve in the future Script to Place Labels on Point Objects http 69 17 46 171 Site Thread aspx id 18608 amp ti 632762469 194000000 nujseyer at 2 22 2006 12 09 AM 19103 Here is my complete script for labeling Somehow somewhere I still can t add the label Sub Main Set document Application ActiveDocument Set components document ComponentSet Set theDrawing components components ItemByName PlotXY obtain source data readers Set data components components ItemByName MyPosition Set dataColumns data ColumnSet Set dataRecords data RecordSet Get value of first record Set dataRecord dataRecords 0 Set dataColumn dataColumns 0 Remove CP Labels for testing 1 0 Do if cstr components i name CP Labels Then components Remove i Else i idtl End If Loop Until i components Count create the labels component Set Labels Application ActiveDocument NewLabels CP Labels theDrawing true bind the labels to a table column Labe
295. ogram However the Manifold Map projects can be accessed from other programming environments that have a lot to offer both the beginning programmer and those that are pushing the Manifold object model to its limits This topic will show you how to use Word VBA to access a Map file Word itself will not be used just the VBA IDE Integrated Development Environment The same concepts apply to other Office VBA programs Excel being one of the most useful as well as Access and to real programming environments like Visual Basic and its big brother Visual Studio Older version as well as the current Net version can be used To prepare for this note the full Windows path to a Manifold On my PC the path is D GIS_DATA Scripts ScriptingTutorial map Note the location on your PC and use that path in the code on the next page Office VBA IDE If you are using Word to view this document all you need to do to access the Office VBA IDE is key Alt F11 Visual Basic from the Tools Macro menu can be used as well as the Visual Basic toolbar Off to the right of the IDE you will see a Projects window similar to the one used in Manifold Double click the ThisDocument component in the Microsoft Word Objects folder A blank screen will appear in the main window Enter this code Option Explicit Sub Tutorial Application MessageBox Hello World vbExclamation Hey End Sub Place the mouse cursor inside the Sub Tutorial
296. oint locations are random Sub Main Set components document ComponentSet protect from being run for the second time If components ItemByName Data Drawing gt 0 Then Application MessageBox Data Drawing component already exists re run the script Exit Sub End If Delete it and 25 create target drawing Set drawing document NewDrawing Data Drawing Application DefaultCoordinateSystemLatLon Set objects drawing ObjectSet Set table drawing OwnedTable Set columns table ColumnSet Set records table RecordSet obtain source data readers Set data components components ItemByName Data Set dataColumns data ColumnSet Set dataRecords data RecordSet walk through data columns creating similar columns in target table For columnIndex 0 To dataColumns Count 1 Set dataColumn dataColumns columnIndex Set column columns NewColumn column Name dataColumn Name column Type dataColumn Type column Size dataColumn Size columns Add column Next walk through data records creating random points in target drawing For recordIndex 0 To dataRecords Count 1 create random lat lon location Set point Application NewPoint point X Rnd 0 5 360 point Y Rnd 0 5 180 R R create drawing object objects Add Application NewGeom GeomPoint point Set dataRecord dataRecords recordIndex transfer fields Set record records
297. oints within the drawings it requires significantly more processing time than simply doing it by hand Could this be done at a higher level than the Drawing ObjectSet There is a good chance I don t know what I am talking about but I am learning Here is the working script albeit a bit slow Any suggestions on making my approach faster would be a big help Thanks again ReProject all drawings in a folder to the new Target system lt script language VBScript gt Set app Application folderName app InputBox Enter Data Folder Ouads Set doc Application ActiveDocument Set cmp doc ComponentSet folderName Sub DoMerge cmp If cmp Type ComponentDrawing Then Set Drawing Components DrawingIndex create target coordinate system Set Target Application NewCoordinateSystem Universal Transverse Mercator Zone 14 N Target Datum Application NewDatum North American 1983 mean for CONUS Target Unit Application NewUnit Meter p create coordinate system converter Set Converter Application NewCoordinateConverter prepare coordinate converter converter Prepare cmp CoordinateSystem Target Set Objects cmp ObjectSet 119 project all objects within drawing For IndexObj 0 To Objects Count 1 Set Object Objects IndexObj converter Convert Object Geom Next modify coordinate system within drawing cmp CoordinateSystem Target ElseIf
298. old adamw on 11 22 2003 3 31 PM 153 No but you can easily generate GUIDs in VB NET with Guid NewGuid Then you will consume the GUIDs in a Manifold script connecting to a NET module through COM rheitzman on 11 23 2003 1 24 PM 162 No but you can easily generate GUIDs in VB NET with Guid NewGuid Then you will consume the GUIDs in a Manifold script connecting to a NET module through COM Adam could you post a simple example of how to access the Net Framework via COM from VBScript 69 Are we talking passing code in text form or executing a compiled application Thanks adamw on 11 24 2003 6 22 AM 179 Here is a short example that uses VB NET 2003 to develop a NET object and calls this object from Manifold script through COM Start VB NET 2003 Invoke File New Project select Visual Basic Projects as a project type select Class Library as a template Set project name to GuidGenerator Click OK Change the contents of the Class1 VB to Imports System Runtime InteropServices Interface definition Public Interface IGuidGenerator ReadOnly Property GuidCount As Integer Function NewGuid As String End Interface Implementation code ClassInterface ClassInterfaceType None ProgId Test GuidGenerator Public Class GuidGenerator Implements IGuidGenerator Number of generated GUIDs Private Generated As Integer Create new GUID generator Public Sub GuidGenerator Generated 0
299. omTo Rect MapWindow Method to add some white space around the primary ZoomTo component Just personal opinion but I think the maps look better zoomed out from the track lines a bit NOT s In many cases the Y extend does not seem to affect how Manifold actually zooms a MapWindow X dominates while the changed Y sometimes seems to be ignored in the final map widow display This seems related to where the geographic objects actually reside on the final map but I don t have a good handle on this yet One could use a single change for both width and height and often end result would be similar Example Useage We want to ZoomTo Component Lines but allow a buffer around the original Lines rectangle Set Win Boundaries Resize DrawingBox Lines 0 10 Win Boundaries is now a Rect Object sized 10 larger in the X direction and 5 larger in the Y direction than the original Lines bounding box Map Window ZoomTo Win Boundaries X Max X Min Y Max Y Min X Change Y Change Comp Type ComponentDrawing Then Application MessageBoxEX _ Function Resize CompBox amp VbCrLf amp VbCrLf amp You are attempting to resize the bounding amp VbCrLf 0 05 rectangle for a component that is NOT a amp VbCrLf amp _ S Drawing This function only works on Drawings Not a Drawing _ MessageBoxTypeOK OR MessageBoxTypelconWarning Exit Function If Resize DrawingBox Comp ObjectSet GeomSet B
300. omponent to image Call component RenderTo renderName x y True locate rendered image and move it into a folder named Screenshots renderIndex document ComponentSet ItemByName renderName If renderIndex gt 0 Then Set render document ComponentSet Item renderIndex If render Type ComponentImage Then folderIndex document ComponentSet ItemByName folderName If folderIndex 0 Then Set folder document NewFolder folderName Else Set folder document ComponentSet Item folderIndex End If If folder Type ComponentFolder Then render Folder folder End If End If End If End Sub 1 Ckokck ck ck ck ck Ck Ck Ck Ck CK Ck Ck Ck Ck CK Ck Ck Ck Ck Ck Ck Ck Ck KKK Ck kk Ck Ck Ck Ck kk Ck ck Ck Ck kk Ck ck Sk Ck kk Sk Sk kk kx Sk kv ko kx ko ko ko ko Sub Main Call Screenshot 2400 1800 End Sub 1 Ckokckck ck ck ck Ck ck kk Ck CK Ck Ck Ck Ck Ck Ck Ck Ck CK Ck Ck Ck Ck Ck Ck Ck Sk Ck ck Ck kk Ck ck Ck Ck kk Ck ck kk Ck kk ko ck Sk Sk Sk ko kv ko kx A A ko ko 1 Ckokck ck ck kk Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck C Ck CC Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck Ck kk Ck kk Ck ck Sk Ck kk Sk Sk Sk Sk kx ko kv ko ko ko ko ko ko Sub Screenshot x y obtain context component and ensure it is drawing image labels map or surface Set windowSet Application WindowSet If windowSet Count lt 0 Then Application MessageBox No opened windows Exit Sub End If Set window windowSet ActiveWindow Set compon
301. omponent which will be used as the beginning tile others will be inserted into this tile Primary Surface 021h01 0200 demw NumberOfSurfaces 0 Redim Surfaces 100 For Each Comp in Comps If Comp Type ComponentSurface Then NumberOfSurfaces NumberOfSurfaces 1 If NumberOfSurfaces 1 gt uBound Surfaces Then Redim Preserve Surfaces uBound Surfaces 100 End If Surfaces NumberOfSurfaces 1 Comp Name End If Next Redim Preserve Surfaces NumberOfSurfaces 1 If NumberOfSurfaces 0 Then Application MessageBox There are no Surfaces in this project Exit Sub End If If NumberOfSurfaces 1 Then Application MessageBox There is only One surface in this project Exit Sub End If Set CoordSys Parametres Surfaces InsertTiles Surfaces Primary Surface 254 End Sub VK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK ko Sk ko ko Sk Mk kx Sk ko ko ko ko kokok Sub Set CoordSys Parametres GeoR ByRef Surfaces ferenc Date code provided by Michael D December 10 2003 Version 1 0 1 Sumner http forum manifold net Site Thread aspx id 498 amp ti 632544163200000000 Dim Counter Dim Comp Comps Dim CoordSys CoordSys Parametres Dim CorrectProjection CorrectDatum Dim local ScaleX local ScaleY local OffsetX Dim NumberOfSurfaces CorrectProjection Latitude Longitude CorrectDatum North American 1983 Canada
302. on object isn t the best example but you get the idea If Option Explicit is on the second statement would generate an error Of course the point of the samples above is to show how to use the VBA IDE so much of that code is not useful back in Manifold If we had dug further into the object model almost all of that code would have been useful On the left the items commented out are not support by VBScript Sub Main required On Error Goto n a Dim As not fully supported Line labels not supported Resume not supported Create a MAP Project File and Drawing through COM or NET Manifold L Author Adam Wachowski Date 12 31 2005 07 23 Subject RE Native Manifold data exchange format http lists directionsmag com discussion read php f 29 amp i 41227 amp t 41227 gt gt gt Does Manifold provide a native ASCII data exchange format gt gt gt gt No Why not exchange data using MAP files gt gt To answer your question I will use an example taken from the gt National Hurricane Centre s tropical cyclone tracks database gt gt The only way I have found to parse a complex file like this and create gt line segment storm tracks is to build a dedicated decode program and gt write the details to a MID MIF file I m a 12 year Mapinfo user gt switching over to Manifold I could then import the line segments gt and view and analyse the tracks I don t know
303. on the Application Messagebox statement and hit F5 or click the run button on the toolbar As you were typing the code the IDE was making suggestions and filling in the blanks very handy This feature is called IntelliSense and I predict you will become addicted to this feature The Option Explicit directive forces you to declare variables before you use them in the code This restriction requires you to understand what the variables will represent before they are used This can help you over the Manifold learning curve quickly and the discipline imposed is good for the quality of the final product You can program without Option Explicit but Excel will just use generic objects and that may get you into trouble However the biggest benefit to declaring variables is that IntelliSense can work to its highest potential 89 The Manifold System Type Library In order to access Manifold project files the IDE needs to be provided a description of the objects it will encounter To accomplish this use xi the Tools References menu Scroll down to the Available References Manifold System Type Library in the list click M to scroll down Check the box and click OK Macro Hierarchy Type Library Mail Message 1 0 Type Library __ Main 1 0 Type Librar Mal Manifold System Type Library _ MediaPlayer 1 0 Type Library ad C Messenger 1 0 Type Library t 1 C Messenger API Type Library Enter the following code m res
304. onents DrawingIndex create target coordinate system Set Target Application NewCoordinateSystem Mercator Target Datum Application NewDatum Clarke 1866 Target Unit Application NewUnit Foot n create coordinate system converter Set Converter Application NewCoordinateConverter prepare coordinate converter converter Prepare Drawing CoordinateSystem Target Set Objects Drawing ObjectSet project all objects within drawing For IndexObj 0 To Objects Count 1 Set Object Objects IndexObj converter Convert Object Geom Next modify coordinate system within drawing Drawing CoordinateSystem Target 17 Drawing Open End Sub Copy Create copying from one drawing to another creating a record in a table These scripts provide simple examples of copying from one drawing to another as well as creating a record in a table Copy all objects from A to B transferring field Name Sub Main Set components document ComponentSet Set drawingA components components ItemByName A Set drawingB components components ItemByName B Set objectsB drawingB ObjectSet instantiate to use LastAdded property Set recordsA drawingA OwnedTable RecordSet Set recordsB drawingB OwnedTable RecordSet For index 0 To drawingA ObjectSet Count 1 Set object drawingA ObjectSet index add object objectsB Add object Geom Set recordA recordsA record
305. oordinate System to Lat Lon http 69 17 46 171 Site Thread aspx id 166 amp ti 6320795 15400000000 Here is th xample code that converts a point from drawing coordinate system to lat lon code temp tag to be replaced Option Explicit Sub Main Dim Pt Drwg Converter Set Pt Application NewPoint 1000 1000 Set Drwg Document ComponentSet Drawing Set Converter Application NewCoordinateConverter Converter Prepare Drwg CoordinateSystem _ Application DefaultCoordinateSystemLatLon Following line converts 1000 1000 from drawing coordinate system to lat lon Converter Convert Pt Application Messagebox Pt X amp amp Pt Y End Sub code temp tag to be replaced Goal is to create a bounding rectangle for each component and store it in a lat long drawing component Speaking of drawings you can project each drawing object to lat lon and compute common bounding box of the projected objects Speaking of images and surfaces while you can project each pixel to lat lon and compute common bounding box of the projected pixels it might be better to project a say 10x10 grid that covers th ntire component and compute a bounding box of 121 that area in many cases projecting just the corners will not work Case majorAxis eccentricity centerX centerY centerZz ignore these cause I don t have a clue as to what they do These are the datum
306. or b the order with which a drawing export processes drawing objects Given that c the IDs assigned to new drawing objects are not guaranteed to be sequential the above solution is good as a one off temporary hack but is too fragile for the long term If you or your friend really want Manifold to export objects to a MIF MID pair in a specific order send a suggestion to sales manifold net Adam Wachowski Adding Editing Objects in a Drawing Layer Manifold L Author Adam Wachowski Date 01 23 2006 08 41 http lists directionsmag com discussion read php f 29 amp i 41380 amp t 41370 Adding an Object Set drw your drawing Set pt Application NewPoint 5 6 Set geom Application NewGeom GeomPoint pt drw ObjectSet Add geom 286 Alter an Object Alter the Geom property of the relevant Object How to Add Objects Points to a Drawing http 69 17 46 171 Site Thread aspx id 18896 amp ti 63275 1025401430000 Can anybody tell me how to create coordinates to a drawing using scripts based on a given set of coordinates I assume you want to add Points to the ObjectSet of a Drawing How is input organised Coming from a table or given by a function of a script Coming as pairs numeric coordinates or as X Y columns or as single Geoms or as PointSet Sample snippet VBscript Set doc Application ActiveDocument Set comps doc ComponentSet Set drwng comps Drawing Set objcts drwng ObjectSet Y x
307. or both Forms and non form versions see C Documents and Settings Lorne_Limited My Documents Manifold VBscript Extract_Object_Coords map VK KK KKK KKK KKK KKK Ck Ck Ck ck KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KK ko Mk Sk Mk kx k ko ko ko ko kockok Option Sub Ma Explicit in Dim Comps Drwg Set Comps Document ComponentSet Set Drwg Comps Drawing 2 WriteCoords 2Comment Drwg 8 5 End Sub VK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK kv Mk ko ko kock ko kock ok Privat Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim e Sub WriteCoords 2Comment ByRef Drwg ByRef Mode Author Lorne Ketch ByRef NumberOfDecimals Permission to use modify and distribute this code is granted provided that you cite the original author Email Ketch at hfx dot eastlink ca Comps Obj Objs Obj Index Obj Geom Obj Branch Branch Index Point Index Pt Pts Object Type Object ID Comment 1 Comment 2 Coord Length Formatted Str CoordSys CoordSys ParmSet Last Index Obj Count Obj Type Qry Rcrds Selected Objects Where Clause Header MaxX WholeNumber MaxY WholeNumber Mode Which Objects to process All Selection Points Lines Areas Points and Lines Points and Areas Lines and Areas OIA BWNE ll NumberOfDecimals Round coordinates to these many decimals 292 Set Comps
308. ordIndex 0 to records Count 1 For i 0 to 19 t i 20 0 Che 1s 46 Fons ti AGL Se Ey Ps G2 3 ck te foe ft S06 Fo et sb 4 6 C8 S S808 Lo tou S Bo a tu 1 766 QA Sp ep OA uu6 Set point Application NewPoint point X Cl tempPointSet Item recordIndex X C2 tempPointSet Item recordIndex 1 X C3 tempPointSet Item recordIndex 2 X C4 tempPointSet Item recordIndex 3 X point Y Cl tempPointSet Item recordIndex Y C2 tempPointSet Item recordIndex 1 Y C3 tempPointSet Item recordIndex 2 Y C4 tempPointSet Item recordIndex 3 Y PointSet Add point Next Next Set point Application NewPoint point X PointSet Item 0 X point Y PointSet Item 0 Y PointSet Add point 10 create new geometric entity Set geom Application NewGeom GeomLine pointSet create new line object component ObjectSet Add geom remove temporary query component components Remove components ItemByID query ID End Sub Open Spline Joins points selected within the active drawing window with an opened 3 spline Sub Main Set windows Application WindowSet fail if there are no opened windows If windows Count 0 Then Application MessageBox No active window Exit Sub End If Set window windows ActiveWindow Set component window Component If In nn Se Se qu Sele fail if active component is not a drawing component Type lt gt ComponentDrawing Then
309. ou don t add a component to the document s ComponentSet it is part of that set by way of it being created through the Document njengler on 10 20 2006 8 38 PM 29165 willh you are suggesting that my code is redundant then If so then this line of code mFolder gDocument NewFolder Name negates the need for gComponentSet Add mFolder That would be great news However the other issue as described how different outcomes occur depending on the sequence of events I take inside manifold 1 e one order of events raises the error the other does not is not addresed Is there a reason behind this Am I missing something Thanks vlacour on 10 21 2006 3 13 AM 29168 Seems to me that when you load the add in the original project might not be the active document anymore you might want to first identify your document by gDocument gApplication NewDocument name of document bReadOnly Or gDocument Open name of document bSaveChanges bReadOnly then mFolder gDocument NewFolder Name 83 Hope it helps vincent The problem was with the redundancy in my code creating the folder object which also adds it to the componentset and then trying to add it to the componentset again This was causing Manifold to raise the error due to unique component name requirements I am guessing Thanks for your help Calling EventArgs without using the OnClick Method http forum manifold net Site Thread aspx id 22306 I am tr
310. ows Set window windows ActiveWindow Set theComponent window Component If theComponent Type ComponentMap Then drill down to active layer Set topDrawing window ActiveComponent Application messagebox Active Drawing is amp topDrawing name Map is amp theComponent name Else Application messagebox _ Activate the map invalid component open Test for Map component FAILED Exit Sub End If 215 End Sub Zoom to Selected Object in Map Window and Save an Image Cannot retrieve the URL Probably Manifold L Many June and July 2006 postings seem to be lost at http lists directionsmag com discussion list php f 29 and http li sts directionsmag com discussion search php f 29 Option Sub Ma Dim Set Set MyMa MyMa Appl End Su Selected TRU Explicit in mdsumner at 7 7 2006 4 37 PM 24027 Here s a basic example in VBScript that just uses the geometric properties that might help you code the C you want I added the Option Explicit changed some of the variable names changed the V6 5 code Set doc Application ActiveDocument Set comps doc ComponentSet to V7 format Set Comps Document ComponentSet Comps Comp MyMap Obj bBox n Comps Document Componentset obtain drawing with area objects Comp Comps World LoRes Drawing obtain map to render from MyMap Comps Map pick an object 0 obj comp ObjectSet
311. ox The RectOobject s min and max properties return values that are in the drawing s projection X Max Resize DrawingBox XMax X Min Resize DrawingBox XMin Y Max Resize DrawingBox YMax Y Min Resize DrawingBox YMin 240 X Change X Max X Min X Percent 2 Y Change Y Max Y Min Y Percent 2 Resize DrawingBox XMin X Min X Change Resize DrawingBox XMax X Max X Change Resize DrawingBox YMin Y Min Y Change Resize DrawingBox YMax Y Max Y Change End Function Yo kckck ck ck ck ck kk kk kk x kk kx ko k ko kc kock ck kc kck Ck Ck Ck Ck Ck ck kk Kk kk Ck Kk e x Mk Kk Kk Kk k ko ko ko k ko kk Does a Component Name Exist in The Project Exi Private Function Component Author Lorne Ketch Email Dim Component Index Dim Comps Set Com Component Index Component Exists False Else Component Exists True End If End Function Yo Ckckckckck ck ck ck ck ck ck ck ck ck ck ck okckckckck kck ck k kk sts ByVal ComponentName Ketch at hfx dot eastlink ca ps Document ComponentSet Comps ItemByName ComponentName If Component Index lt 0 Then KKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Delete a Project Component pass component name Private Sub Dele Author Email Lorne Ketch Dim Com Dim Com ponent Index ps Set Com ps Component Index If Component Index 0 Then te Component ComponentName Ke
312. oyeeIndex EmployeeIndex 1 Reload End If End Sub Ck CK CK Ck Ck kk kk Ck Kk kk kk Ck I kk kk x Kk M Kk kx ko Mk ko ko ko ko ko ko ko ko ko load current employee Sub Reload Text Formats utilities for reading data from simple ASCII formats Set Rec Employees RecordSet EmployeeIndex set employ readouts J I EmployeeIndex 1 amp Title Text Rec Data Title BirthDate Text Rec Data Birth Date HireDate Text Rec Data Hire Date Country Text Rec Data Country Region Text Rec Data Region City Text Rec Data City PostalCode Text Rec Data Postal Code Address Text Rec Data Address Notes Text Rec Data Notes End Sub Ck CK CK Ck Ck CK Ck Ck Ck CI kk kk kk kk kk x kk kx ko ko ko ko ko ko ko ko k ko ko Export Released45 Text File read by Release 4 5 Read Text File solver Sub Main Set Windows Application WindowSet fail if there is no opened windows If Windows Count 0 Then Application MessageBox No active window Exit Sub End If Set Window Windows ActiveWindow Set Component Window Component mployee Text Rec Data First Name amp CSET amp Rec Data Last Name Exports selected objects in opened drawing to a file that can be amp G 48 amp fail if active component is not a drawing If Component Type ComponentDrawing Then Application MessageBox Ac
313. p TableColumnPaste TableColumnPasteAppend TableColumnRecompute TableColumnRename TableColumnReplace TableColumnSortAscending TableColumnSortDescending TableColumnTransferRules TableColumnWidth TableDesign TableDesignAdd TableDesignDelete TableDesignEditValues TableDesignMoveDown TableDesignMoveToBottom TableDesignMoveToTop TableDesignMoveUp TableDesignShowDefaultValues TableDesignShowExtendedProperties TableDesignShowLanguages TableDesignShowTransferRules TableDesignShowTypes TableGeocode TableMatch TableMatchMatchAll TableMatchMoveDown TableMatchMoveToBottom TableMatchMoveToTop TableMatchMoveUp TableMatchUseCase TableMatchUselnterior Whitespace TableMatchUseSide Whitespace TableOpenDataSource TableOpenDrawing TableOpenScript TableQueryAreas TableQueryBottom TableQueryContaining TableQueryContainingMatch TableQueryContainingToken TableQueryDuplicates TableQueryDuplicatesExceptFirst TableQueryEmpty TableQueryEnding TableQueryEndingWithMatch TableQueryEndingWithToken TableQueryEqual TableQueryGreater TableQueryGreaterOrEqual TableQueryLess TableQueryLessOrEqual TableQueryLines TableQueryMatching TableQueryMaximum TableQueryMedian TableQueryMinimum TableQueryNotEqual TableQueryPoints TableQuerySizeEqual TableQuerySizeGreater TableQuerySizeGreaterOrEqual TableQuerySizeLess TableQuerySizeLessOrEqual TableQuerySizeNotEqual TableQuerySounding TableQueryStarting TableQueryStartingWithMatch TableQueryStartingWi
314. p ViewLayersOpacity ViewLayersProperties ViewLayersRestrictions ViewLayersShowAll ViewLayersSwitchTo ViewLegend ViewLegendAlignLeftBottom ViewLegendAlignLeftTop ViewLegendAlignNone ViewLegendAlignRightBottom ViewLegendAlignRightTop ViewLegendCopy ViewLegendCopyStructure ViewLegendElementAdd ViewLegendElementAddSamples ViewLegendElementDelete ViewLegendElementFlatten ViewLegendElementMoveDown ViewLegendElementMoveToBottom ViewLegendElementMoveToTop ViewLegendElementMoveUp ViewLegendHide ViewLegendPaste ViewLegendPasteAppend ViewLegendProperties ViewNorthArrow ViewNorthArrowAlignLeftBottom ViewNorthArrowAlignLeftTop ViewNorthArrowAlignNone ViewNorthArrowAlignRightBottom ViewNorthArrowAlignRightTop ViewNorthArrowCopy ViewNorthArrowHide ViewNorthArrowPaste ViewNorthArrowProperties ViewNotes ViewNotesClear ViewNotesLoadFromFile ViewNotesPrint ViewNotesSaveToFile ViewProject ViewProjectAssignProjection ViewProjectCached ViewProjectChangeProjection ViewProjectCheckIn ViewProjectCheckOut ViewProjectCopy ViewProjectCreate ViewProjectCreateChart ViewProjectCreateComments ViewProjectCreateDrawing ViewProjectCreateElevation ViewProjectCreateFolder ViewProjectCreateForm ViewProjectCreatelmage ViewProjectCreateLabels ViewProjectCreateLayout ViewProjectCreateMap ViewProjectCreatePalette ViewProjectCreateProfile ViewProjectCreateQuery ViewProjectCreateScript ViewProjectCreateSurface ViewProjectCreateTable ViewProjectCreateTe
315. p on the CreateObject line eventually throwing the exception Cannot Create ActiveX Object This exact same code used worked just fine with Manifold 6 0 6 5 and I believe 7 0 I may have not actually used the now problematic functionality in the brief interim between installing 7 0 and 7x 87 Progressbar Object Does anyone know the code to successfully handle a user enacted cancel of the ProgressBar object in VB NET for an Add in to Manifold 7 I just tried this code and it seems to halt OK both messages are shown when you cancel VB NET Imports Manifold Interop Scripts Imports Manifold Interop Imports System Threading Class Script Shared Sub Main Dim progress As Progress Context Application NewProgress progress MaxPosition 100 progress Text Lengthy operation progress Start Do While progress Position lt progress MaxPosition progress Position progress Position 1 progress Text Lengthy operation amp progress Position amp done If Not progress Update Then Context Application MessageBox Canceled Script Exit Do End If Thread Sleep 100 Loop progress Stop Context Application MessageBox After the loop Script End Sub End Class Using the VBA Programming Environment http www georeference org DNN31 KnowledgeBase Articles UsingV B A tabid 87 Default aspx PageContentID 1 You will most commonly use Manifold scripting from within the Manifold pr
316. pAddLayersMoveToTop MapAddLayersMoveUp MapAddLayersSelectAll MapAddLayersSelectInverse MapAddLayersSelectNone MapAddNewDrawing MapAddNewlImage MapAddNewLabels MapLayerAddLayers MapLayerAddNewDrawing MapLayerAddNewImage MapLayerAddNewLabels MapLayerCenter MapLayerCopy MapLayerCut MapLayerDelete MapLayerDuplicate MapLayerMatch MapLayerMoveDown MapLayerMoveToBottom MapLayerMoveToTop MapLayerMoveUp MapLayerOpacity MapLayerOpen MapLayerOpenInNew Window MapLayerPaste MapLayerPasteA ppend MapLayerProjectToMap MapLayerProperties MapLayerRegister MapLayerRename MapLayerRestrictions MapLayerTransferHeights MapLayerTransferSelection MapLayerUseProjection MapLayerVisible MapLayerVisibleArea MapLayerZoom MapLayerZoomToSelection MapMatch MapSpatialOverlay MapTopologyOverlay MapTransferHeights MapTransferSelection MapTransferSelectionSelectAll MapTransferSelectionSelectInverse MapTransferSelectionSelectNone MapVisibleArea MouseCenterPoint MouseDefault MouseEditBranchDelete MouseEditBranchSplit MouseEditCoordinateAdd MouseEditCoordinateAddOnSegment MouseEditCoordinateDelete 270 MouseEditCoordinateDeleteSplitBranch MouseEditExtend MouseEditLeave MouseEditSplit MouseEditTrim MouseGrabber MouselnsertActiveX MouselnsertAnimation MouselnsertArea MouselnsertBox MouselnsertBoxOnCenter MouselnsertChart MouselnsertCheckBox MouselnsertCircle MouselnsertCircleGeographic MouselnsertCircleOnCenter MouselnsertComboBox Mouselns
317. plicate DrawingObjectCoordinateSnap DrawingObjectCoordinates DrawingObjectCoordinatesAddBranch DrawingObjectCoordinatesAddPoint DrawingObjectCoordinatesBreakBranch DrawingObjectCoordinatesDelete DrawingObjectCoordinatesDeleteBranch DrawingObjectCoordinatesMoveDown DrawingObjectCoordinatesMoveToBottom DrawingObjectCoordinatesMoveToTop DrawingObjectCoordinatesMoveUp DrawingObjectCoordinatesNative DrawingObjectCoordinatesPrint DrawingObjectCopy DrawingObjectCut DrawingObjectDelete DrawingObjectDuplicate DrawingObjectOrthogonalize DrawingObjectPaste DrawingObjectPasteAppend DrawingObjectSegmentDelete DrawingObjectSegmentDeleteSplitBranch DrawingObjectSegmentize DrawingObjectSimplify DrawingObjectSnap DrawingObjectZoom DrawingOpenDataSource DrawingOpenTable DrawingOptimalRoute DrawingOptimalRouteVisual DrawingOptimalRouteVisualCenter DrawingOptimalRouteVisualDelete DrawingOptimalRouteVisualMoveDown DrawingOptimalRouteVisualMoveToBottom DrawingOptimalRouteVisualMoveToTop DrawingOptimalRouteVisualMoveUp DrawingOptimalRouteVisualPing DrawingOptimalRouteVisualShowNames DrawingOptimalRouteVisualTraceRoute DrawingOrthogonalize DrawingRelink DrawingSegmentize DrawingSendEmail DrawingSimplify DrawingSnap DrawingSpatialOverlay DrawingTopologyFactory DrawingTopologyFactoryCenter DrawingTopologyFactoryFix DrawingTopologyFactoryFixMethod DrawingTopologyFactoryFixSelected DrawingTopologyFactoryGoFirst DrawingTopologyFactoryGoLast
318. plication NewImport OLEDB iadonet ConnectionString Provider SQLOLEDB 1 amp _ Integrated Security SSPI amp _ Persist Security Info False amp _ Initial Catalog test amp _ Data Source test iadonet ConvertPolicy M ConvertPolicy ConvertSome use the Tables property iadonet Tables Add dbo Mexico iadonet Import ignore the parameter End Sub End Class Export a Palette using a Script http forum manifold net Site Thread aspx id 33341 adamw on 1 18 2007 6 17 AM 33617 0000000000 You can export a palette using a script VBScript Sub Main 265 Set pal Document ComponentSet Palette Set cmt Document NewComments Palette Dump For Each color In pal ColorSet cmt AddText color Red amp amp color Green amp amp color Blue amp Chr 13 amp Chr 10 Next cmt Open End Sub 266 Preset Definintions Command Filter List http 69 17 46 171 Site Thread aspx id 20620 amp ti 632823354777800000 adamw at 5 4 2006 6 33 AM 20838 Invoke the command prompt navigate to the Manifold installation folder and run the following command line manifold exe clist path txt where path txt is somewhere you have write access to This will dump the names of all available commands List for V7x ChartData ChartDataMoveDown ChartDataMoveToBottom ChartDataMoveToTop ChartDataMoveUp ChartDataSelectAll ChartDataSelectInverse ChartDataSelect
319. ponent Example description This example add in demonstrates how to make quick screenshots of the active component analogous to the output of the MakeImage command in the entire component mode The example illustrates how to obtain the currently opened component how to screenshot a component into a new image of desired size how to place a component into a folder creating one if necessary To deploy the example Copy the files in the Add folder into a new folder under Config Open the Screenshots xml file with Notepad and correct the paths to the script files given in lines 8 13 and 18 Restart Manifold ca Q ve ENSHOT XML 57 LS xml lt addin gt lt name gt Screenshots lt name gt lt copyright gt CDA International 2003 lt copyright gt lt description gt Takes quick screenshots of currently opened component at different solutions lt description gt lt command gt lt name gt Screenshot 400x300 lt name gt lt path gt Screenshots ScreenshotSmall txt lt path gt lt status gt Takes a small screenshot of currently opened component lt status gt lt command gt lt command gt lt name gt Screenshot 800x600 lt name gt lt path gt Screenshots ScreenshotMedium txt lt path gt lt status gt Takes a screenshot of currently opened component lt status gt lt command gt lt command gt lt name gt Screenshot 2400x1800 lt name
320. ponents Remove components ItemByID query ID Application MessageBox There should be at least two selected points Exit Sub End If create new point set object Set pointSet Application NewPointSet scan queried table adding locations to point set For recordIndex 0 to records Count 1 Set record records recordIndex Set point Application NewPoint point X CDbl record Data X I point Y CDbl record Data Y I pointSet Add point Next 27 create new geometric entity Set geom Application NewGeom GeomLine pointSet create new line object component ObjectSet Add geom remove temporary query component components Remove components ItemByID query ID End Sub Spatial Operations create a circle around each city Create a Circle Around Each City Creates a circle around each city taking radius of the circle from table Sub Main Set components document ComponentSet locate city drawing drawingIndex components ItemByName Cities If drawingIndex 0 Then Application MessageBox No Cities component Exit Sub End If Set drawing components drawingIndex ensure component type is drawing If drawing Type ComponentDrawing Then Application MessageBox Cities is not a drawing Exit Sub End If obtain set of drawing objects Set objects drawing ObjectSet ensure drawing is not empty If objects Count lt 0
321. pplication WindowSet ActiveWindow If Active Window Component Type ComponentMap Then End Set Dele Set Set Set Col Col Col Set Col Cols Col Cols Set Application MessageBox The Active Window must be a Map Exit Sub If Map Layers Active Window Component LayerSet te Component Layer CoordSystems CoordSys Table Document NewTable Layer CoordSystems Cols CoordSys Table ColumnSet NOTE following 4 lines do not work if run under the Debugger The column name is not changed and the type is not set You get an error later when the code trys to find column MapLayer Code works fine if not run through the Debugger Col Cols Item 0 Name MapLayer Type ColumnTypeWText Size 100 Col Cols NewColumn Name CoordSys Name Type ColumnTypeWText Size 100 Add Col Col Cols NewColumn 123 FROM Col Name Datum Col Type ColumnTypeWText Col Size 100 Cols Add Col Set Col Cols NewColumn Col Name EllipsoidName Col Type ColumnTypeWText Col Size 100 Cols Add Col Set Col Cols NewColumn Col Name CoordSys Unit Col Type ColumnTypeWText Col Size 50 Cols Add Col Set Col Cols NewColumn Col Name localOffsetx Col Type ColumnTypeFloat32 Cols Add Col Set Col Cols NewColumn Col Name localOffsetY Col Type ColumnTypeFloat32 Cols Add Col Set Col Cols NewColumn Col Name localScaleX Col Type
322. pserver object var mapserver mapserver Server CreateObject Manifold MapServer mapserver Create Server MapPath config txt state Server turn off all layers but the first if just entered the sit if state var layerList mapserver Layers split n var index 0 for index 1 index lt layerList length index mapserver TurnLayer index false 181 code temp tag to be replaced Thank you Adam it works fine But there is only one more small problem that is The layers are disabled on startup and the checkboxes have to apear disabled too I solved the problem by changing the variable layerChck checked to layerChck unchecked and the checkboxes apear disabled too But what happens when i click in one checkbox the check apears and turn on the layer but disapears again i mean the layer is turned on but the checkbox is unchecked Can you help me Thanks again cas 2004 07 27 3 41 AM But what happens when i click in one checkbox the check appears and turn on the layer but disapears again 1 mean the layer is turned on but the checkbox is unchecked Can you help me Could you post your code The code is here code temp tag to be replaced create layers pane if necessary var layersC var layerChck var layerDefv command startup on var layerList layers split n layerList new Array 9
323. r MaxY WholeNumber NumberOfDecimals t l AddText Formatted Str amp VbCrLf Comment 2 AddText FormatNumber Pt X NumberOfDecimals 1 1 amp VbTab amp amp VbCrLf FormatNumber Pt Y NumberOfDecimals Next Point Index Next Branch Index Comment l AddText VbCrLf Application StatusText Next Application StatusText Comps Object Coords 2 Comps Object Coords 1 cstr Obj Index 1 amp of amp cStr Last Index 1 Next Obj Index Drwg SelectNone End Sub Open Open KKK Ck ck KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK ko ko kx ko ko ko ko kockok Private Function Component Exists ByVal ComponentName Dim Component Index Dim Comps Author Lorne Permission to use provided Email that Set Comps Component Index Ketch modify and distribute this code is granted you cite the original author Ketch at hfx dot eastlink ca Document ComponentSet Comps ItemByName ComponentName If Component Index lt 0 Then Component Exists Else End If Component Exists End Function Private Function Forma ByVal ByVal ByRef ByRef ByRef Author X Yu a MaxX WholeN MaxY WholeN NumberOfDec Lorne Permission to False True Ck CK Ck Ck Ck Ck CC Ck Ck Ck Ck Ck Ck Ck CK Ck Ck Ck Ck Ck Ck kk Ck Ck Ck ck kk Ck Sk Ck Ck kk Ck kk Ck ck kk ko kk ko ko Sk Kk kx Mk kv ko k
324. r MouseSelectTouch MouseTraceArea MouseTraceAuto MouseTraceLine MouseTracePoint MouseTracker MouseZoomBox MouseZoomIn MouseZoomOut PaletteOpenImage ProfileCoordinateAdd ProfileCoordinateDelete ProfileCoordinateDuplicate ProfileCoordinates ProfileCoordinatesAdd ProfileCoordinatesDelete ProfileCoordinatesMoveDown ProfileCoordinatesMoveToBottom ProfileCoordinatesMoveToTop ProfileCoordinatesMoveUp ProfileCoordinatesNative ProfileCoordinatesPrint ProfileOpenSurface QueryOpenTable QueryRun ScriptCompileToDIl ScriptLanguage ScriptOpenForm ScriptOpenTable ScriptPause ScriptReferences ScriptReferencesAdd ScriptReferencesDelete ScriptReferencesMoveDown ScriptReferencesMoveToBottom ScriptReferencesMoveToTop ScriptReferencesMoveUp ScriptRun ScriptRunUnderDebugger ScriptStepInto ScriptStepOut ScriptStepOver ScriptStop SurfaceContours SurfaceContoursA dd SurfaceContoursAddSequence SurfaceContoursDelete SurfaceContoursModeDown SurfaceContoursMoveToBottom SurfaceContoursMoveToTop SurfaceContoursMoveUp SurfaceConvertTo SurfaceFilter SurfaceInvert SurfaceNoise SurfaceOpenDataSource SurfacePosterize SurfaceQuantize SurfaceRelink SurfaceResize SurfaceThreshold SurfaceTile SurfaceTransform SurfaceTransformAddMargin SurfaceTransformBlur SurfaceTransformBlurParameter SurfaceTransformCrop SurfaceTransformCropMargin SurfaceTransformDifferenceEast SurfaceTransformDifferenceNorth SurfaceTransformDifferenceNorthEa
325. r As Object ByVal args As EventArgs MessageBox Show Hi End Sub 101 End Class End Class 102 Coordinate System Manipulation Setting Current Projection of Images http 69 17 46 171 Site Thread aspx id 1213 amp ti 632114255400000000 jkelly on 2 3 2004 5 19 PM 1214 If you are importing images that have specific scale and offset values then the usual set current projection scripts about don t take these values into account resetting the origin as 0 0 The script below allows a bulk re projection of images that are in this category code temp tag to be replaced AssignAMGCoordSysToImage Assign a Current Coordinate System to images that have scale and offset values This could be incorporated into your Manifold configuration as an Add In menu or toolbar button See the Add Ins topic Uses all the parameters of the coordinate system in this case Australia AMG66 55 except the local scale and offset values which are obtained from the image before th current projection is set Author James Kelly Date February 4 2004 Version 1 0 0 jkellyGlesterfranks com au Platform Manifold 5 5 SP2 Not tested on any other Language VBScript Manifold System Permission to use modify and distribute this code is hereby granted providing this entire comment section is included No warranty is expressed or implied C CC C 0 KK kk x M M Mk kx KKK KKK x Mk Mk KKK KKK KKK KKK
326. rameters is shifted and that results in mdsumner s nice script to Set Current Projection to fail We have to adjust the script to localScaleX params 9 localScaleY params 11 localOffsetX params 13 localOffsetY params 15 reading and writing a few lines later or explicitly change to localScaleX params params ItemByName localScaleX FOLLOWUP NOTE FROM ADAM adamw at 5 18 2006 9 02 PM 21357 I suggest using the second variation possibly simplified to VBScript localScaleX params localScaleX Names are much more robust than indices There is still no guarantee that the names will not change between versions but they are much less likely to change than indices Surfaces Import Projection Merging scripting 12 09 2003 10 13 PM http www georeference org Forums tabid 7 1 forumid 7 postid 477 view topic Default aspx Hello there s been various discussions regarding automation and performance with surfaces in Manifold lately so I just thought I d relate a happy story regarding something just done on a Dell P4 2 60GHz with 1 0 Gb RAM Windows XP Pro 2002 SP1 Manifold 5 50 Pro SP2 The scripts used are provided and discussed below 146 I ve indicated very rough guesses at the time taken for each step the total time to re write the scripts was less than an hour after 18 mths experience Most of the scripting is basic modifications on the Manifold examples The map files of 500Mb wer
327. ransformCopyUrlServer TableTransformCopyWeek TableTransformCopyY ear TableTransformCopyY earLeapFlag TableTransformCosine TableTransformDecimalFraction TableTransformDecode TableTransformDecreaseDay TableTransformDecreaseHour TableTransformDecreaseMinute TableTransformDecreaseMonth TableTransformDecreaseSecond TableTransformDecreaseWeek TableTransformDecreaseY ear TableTransformDeleteContaining TableTransformDeleteContainingMatch TableTransformDeleteContainingToken TableTransformDeleteEnding TableTransformDeleteEndingWithMatch TableTransformDeleteEndingWithToken TableTransformDeleteFirstToken TableTransformDeleteLastToken TableTransformDeleteLeft TableTransformDeleteMatching TableTransformDeleteRight TableTransformDeleteSounding TableTransformDeleteStarting TableTransformDeleteStartingWithMatch TableTransformDeleteStartingWithToken TableTransformDivide TableTransformEncode TableTransformExponentiate TableTransformFill TableTransformFill WithA verage TableTransformFillWithE TableTransformFillWithExcess TableTransformFill WithMaximum TableTransformFillWithMedian TableTransformFill WithMinimum TableTransformFill WithPi TableTransformFillWithRandom TableTransformFillWithSkewness TableTransformFillWithStdDeviation TableTransformFillWithSum TableTransformFill WithVariance TableTransformGeometricSeries TableTransformIncreaseDay TableTransformIncreaseHour TableTransformIncreaseMinute TableTransformIncreaseMonth TableTransformIncrease
328. rer window right click Class1 vb and select Delete 3 In the Solution Explorer window right click MyPane and select Add User Control Set the control name to MyPaneControl and click Add 4 In the MyPaneControl vb design window add a button Toolbox Common Controls Button and a label Toolbox Common Controls Label Double click the button to add a handler for the button s Click event 5 In the Solution Explorer window right click MyPane and select Add Reference In the Add Reference dialog switch to the Browse tab locate the Manifold installation folder select Manifold Interop dll and Manifold Interop Scripts dll and click OK 6 In the MyPaneControl vb code window select all text and replace it with Public Class MyPaneControl Implements Manifold Interop Scripts IEventsConnection Dim app As Manifold Interop Application Private Sub Buttonl Click ByVal sender As System Object _ ByVal e As System EventArgs Handles Buttonl Click If Not app Is Nothing Then app MessageBox The document contains _ app ActiveDocument ComponentSet Count ToString component s End If End Sub Public Sub ConnectEkvents ByVal ev As Manifold Interop Scripts Events Implements Manifold Interop Scripts IEventsConnection ConnectEvents AddHandler ev DocumentClosed AddressOf Document Changed AddHandler ev DocumentCreated AddressOf Doc
329. revent a Manifold error message when one attempts to return height information for a point not contained in the surface L Ketch MinX Pixs box xMin MaxX Pixs box xMax MinY Pixs box yMin MaxY Pixs box yMax X pt X Y srf Height pt Y 1 If X MinX or X MaxX or Y MinY or Y MaxY Then Application MessageBox Point is Not on the Surface X amp xco amp y amp yco amp T Exit Sub End If ats ai aan EUER ESO ts Bi ee he te a aA a Be a EORR ts nce ORE SE RES WERDE MUN S AE ES Line below will generate an error if the point xco yco does not exist on the surface circumvented by code above LAK Pind pixs ItemByXY X Y If Pind gt 0 Then Z pixs pind Value Application MessageBox Height amp Z End If End Sub 141 Batch Transform Image Gamma http 69 17 46 171 Site Thread aspx id 29027 amp ti 632975 122283300000 Does anyone have a script that would get me started on batch image transforms such as altering Gamma by a fixed amount VBScript Sub Main Set doc Application ActiveDocument Set comps doc ComponentSet Set comp comps Image Set anlz doc NewAnalyzer anlz Gamma comp PixelSet 40 End Sub If you want to modify a selection Sub Main Set doc Application ActiveDocument Set comps doc ComponentSet Set comp comps Image Set anlz doc NewAnalyzer anlz Gamma comp Selection 40 End Sub To loop over eve
330. rm FileCreatelmage FileCreateLabels FileCreateLayout FileCreateMap FileCreateMapMoveDown FileCreateMapMoveToBottom FileCreateMapMoveToTop FileCreateMapMoveUp FileCreateMapSelectAll FileCreateMapSelectInverse FileCreateMapSelectNone FileCreatePalette FileCreateProfile FileCreateQuery FileCreateScript FileCreateSurface FileCreateTable FileCreateTableAdd FileCreateTableDelete FileCreateTableMoveDown FileCreateTableMoveToBottom FileCreateTableMoveToTop FileCreateTableMoveUp FileCreateTerrain FileCreateTheme FileCreateZones FileExit FileExportDrawing FileExportImage FileExportSelectAll FileExportSelectInverse FileExportSelectNone FileExportSurface FileExportTable FileExportText FileExportWebPage FileImportAdd FilelmportComments FilelmportComponent FilelmportComponentFromServer FileImportDelete FileImportDrawing FileImportImage FilelmportMoveDown FilelmportMoveToBottom FilelmportMoveToTop FilelmportMoveUp FileImportQuery FileImportRefresh FileImportScript FileImportSelectAll FileImportSelectInverse FileImportSelectNone FileImportSurface FileImportTable FileLinkComments FileLinkComponent FileLinkComponentFromServer FileLinkDrawing FileLinkImage FileLinkQuery FileLinkScript FileLinkSurface FileLinkTable FileNew FileOpen FileOpenRecent FilePageSetup FilePrint FilePrintDirect FileSave FileSaveAs FormAbout FormClose FormControlBestFit FormControlCopy FormControlCut FormControlDelete FormCont
331. rmat Report AddText xml s tp www fgdc gov metadata m Condensed Geography Report AddText xml s www fgdc gov metadata m typ t xt xsl fgdc esri xsl lt xm etada l stylesh ta metaxm 1 p P typ aw t xt xsl fgdc faq xsl1 sh taxm tork 1 typ Ww S xt xsl l fgdc geography network xsl tp taxm AddTex AddTex AddTex AddTex AddTex AddTex AddTex metadata amp vbCrLf lt idinfo gt amp vbCrLf lt citation gt amp vbCrLf lt citeinfo gt amp vbCrLf lt origin gt ToDo lt origin gt amp vbCrLf lt pubdate gt amp YYYYMMDD Date Now lt title gt amp manComp Name amp lt title gt amp lt pubdate gt amp vbCrLf amp vbCrLf Repor Repor Repor AddTex AddTex AddTex ELO CLE TETT R Cb CL ocE CU t t t t t t t t t t lt citeinfo gt lt citation gt lt descript gt amp vbCrLf amp vbCrLf amp vbCrLf 159 Report AddText lt abstract gt Component Description Property amp manComp Description amp lt abstract gt amp vbCrLf Application StatusText Application StatusText amp S ComponentReport manComp Report AddText supplinf amp s amp supplinf amp vbCrLf Application StatusText Application StatusText amp
332. rolMoveDown FormControlMoveToBottom FormControlMoveToTop FormControlMoveUp FormControlPaste FormControlPasteAppend FormControlProperties FormControlSnap FormOpenScript FormProperties FormRun FormRunUnderDebugger FormSizeToFit FormTabOrder FormTabOrderMoveDown FormTabOrderMoveToBottom FormTabOrderMoveToTop FormTabOrderMoveUp FormTest HelpAbout HelpActivate HelpActivateExtension HelpCheckForUpdates HelpContents HelpIndex HelpSearch HelpWebCommunity HelpWebFreeStuff HelpWebHome HelpWebNews HelpWebSupport ImageBrightnessContrast ImageColorBalance ImageColorize ImageConvertTo ImageCreateIndexDrawing ImageDiffuse ImageDither ImageDownload ImageEqualize ImageFilter ImageFluoresce ImageGamma ImageGaussianBlur ImageHueSaturation Imagelnvert ImageMotionBlur ImageNoise ImageOpenDataSource ImageOpenPalette ImagePosterize ImageQuantize ImageRelief ImageRelink ImageResize 269 ImageSimplify ImageThreshold ImageThresholdColor ImageTile ImageTransformAddMargin ImageTransformAddNoise ImageTransformAddNoiseMono ImageTransformAutoContrast ImageTransformAutoLevel ImageTransformBlur ImageTransformBlurParameter ImageTransformBrightness ImageTransformContrast ImageTransformCrop ImageTransformCropMargin ImageTransformDesaturate ImageTransformDifferenceEast ImageTransformDifferenceNorth ImageTransformDifferenceNorthEast ImageTransformDifferenceNorthWest ImageTransformDifferenceSouth ImageTransformDifferenceSouthEas
333. rrain ViewProjectCreateTheme ViewProjectCreateZones ViewProjectCut ViewProjectDelete ViewProjectDesign ViewProjectDuplicate ViewProjectExport ViewProjectGetLatestVersion ViewProjectMakelImage ViewProjectOpen ViewProjectOpenDataSource ViewProjectOpenInNewWindow ViewProjectPaste ViewProjectPasteAs ViewProjectPasteAsChart ViewProjectPasteAsComments ViewProjectPasteAsDrawing ViewProjectPasteAsElevation ViewProjectPasteAsForm ViewProjectPasteAsImage ViewProjectPasteAsLabels ViewProjectPasteAsLayout ViewProjectPasteAsMap ViewProjectPasteAsPalette ViewProjectPasteAsProfile ViewProjectPasteAsQuery ViewProjectPasteAsScript ViewProjectPasteAsSurface ViewProjectPasteAsTable ViewProjectPasteAsTerrain ViewProjectPasteAsTheme ViewProjectPasteAsZones ViewProjectPrint ViewProjectProperties ViewProjectRefresh ViewProjectRefreshData ViewProjectRelink ViewProjectRename ViewProjectRun ViewProjectRunUnderDebugger ViewProjectShare ViewProjectUnlink ViewProjectUnlinkLabels ViewProjectUnshare ViewProperties ViewRefresh ViewRefreshAuto ViewRefreshData ViewReview ViewReviewCenter ViewReviewColumns ViewReviewUseAllLocal ViewReviewUseAllRemote ViewReviewUseLocal ViewReviewUseRemote ViewReviewViewConflict ViewReviewZoom ViewScaleBar ViewScaleBarAlignLeftBottom ViewScaleBarAlignLeftTop ViewScaleBarAlignNone ViewScaleBarAlignRightBottom ViewScaleBarAlignRightTop ViewScaleBarCopy ViewScaleBarHide ViewScaleBarPaste ViewScaleBarProper
334. rt AddText place amp vbCrLf Report AddText keywords amp vbCrLf Report AddText accconst ToDo accconst amp vbCrLf Report AddText useconst ToDo useconst amp vbCrLf Report AddText idinfo amp vbCrLf Report AddText metainfo amp vbCrLf Report AddText metd amp YYYYMMDD Date Now amp metd amp vbCrLf 161 Contact Info insert you contact info in place of ToDo Report AddText lt metc gt amp vbCrLf Report AddText lt cntinfo gt amp vbCrLf choose one of the next two sections unless you do mp will return the error Error line xx Contact Information permits only one of Contact Person Primary or Contact Organization Primary Contact Person Primary lt cntperp gt amp vbCrLf lt cntper gt ToDo lt cntper gt amp vbCrLf lt cntorg gt ToDo lt cntorg gt amp vbCrLf lt cntperp gt amp vbCrLf Contact Organization Primary lt cntorgp gt amp vbCrLf lt cntorg gt ToDo lt cntorg gt amp vbCrLf lt cntper gt ToDo lt cntper gt amp vbCrLf lt cntorgp gt amp vbCrLf Report AddText Report AddText Report AddText Report AddText an Report AddText l Report AddText Report AddText Report AddText ananasa Report AddText lt cntaddr gt amp vbCrLf choose and address type or make one up Report AddText lt addrtype gt ToDo mailing physical mailing and physical free t
335. ry image in the project Sub Main Set doc Application ActiveDocument Set comps doc ComponentSet Set anlz doc NewAnalyzer For each comp in comps If comp TypeName Image Then anlz Gamma comp PixelSet 40 Next End Sub 142 Sum all Surfaces in a Project Dear List I have to sum all surfaces in a many different maps I can use the Transform dialog but that is going to be a lot of work Does there already exist a script which sums all surfaces in a map Thanks for your help Niels Try this requires Surface Tools because of the call to Surface Transform With VBScript Sub Main Set sum Nothing For Each c In Document ComponentSet If c Type ComponentSurface Then Set sum Document NewSurface Sum c Width c Height ValueTypeFloat64 c CoordinateSystem Exit For End If Next If sum Is Nothing Then Exit Sub End If For Each c In Document ComponentSet If c Type ComponentSurface And c ID lt gt sum ID Then sum PixelSet TransformWith amp sum Name amp amp c Name amp End If Next End Sub Extract the Surface Height for Each Point in Drawing http 69 17 46 171 Site Thread aspx id 1196 amp ti 632 18825 1000000000 The following script reports a height for each point in a drawing D on a surface S Sub Main Set cset Application ActiveDocument ComponentSet Set drw cset D Set srf cset S prepare to convert coordinates from surface to drawing Set c
336. s Set table drawing OwnedTable Set records table RecordSet Application StatusText Cleaning up cities cleanup cities For recordIndex 0 To records Count 1 Set record records recordIndex clean up country field record Data Country Next locate service query queryIndex components ItemByName Service Query If queryIndex lt 0 Then Application MessageBox No Service Query component 32 Exit Sub End If Set query components queryIndex ensure component is drawing If query Type ComponentQuery Then Application MessageBox Service Query is not a query Exit Sub End If Application StatusText Executing query obtain query table and set of table records Set table query Table Set records table RecordSet Application StatusText Transferring data transfer data from one column to another For recordIndex 0 To records Count 1 Set record records recordIndex copy country field record Data Country record Data CountryOrg Next Application StatusText End Sub Surfaces computes average height and selects pixels below this height Select Band Sub Main Set app Application locate opened window and ensure it displays surface Set window app WindowSet ActiveWindow Set component window Component If window Component Type lt gt ComponentSurface Then Application MessageBox No surface Exit
337. s records Count 1 For columnIndex 0 To dataColumns Count 1 Set dataColumn dataColumns columnIndex record Data dataColumn Name dataRecord Data dataColumn Name Next 112 Next Add Component to Map Se Se Se Se Dwg Application ActiveDocument comps Dwg ComponentSet map comps Map of Angeles mapLayerSet map LayerSet ct ct ct cf Set gcps comps PlotXY Set newLayer Dwg NewLayer gcps 1 mapLayerSet Add newLayer t ct Display Map map Open End Sub nujseyer at 1 18 2006 4 39 PM 18011 I ve solve my problem I just needed to insert some source code after create lat lon location Set point Application NewPoint my longitude my latitude anyway thanks to all Improving Performance when using CoordinateConverter Convert http 69 17 46 171 Site Thread aspx 1d 17995 amp ti 632736830017630000 nwdanner at 1 18 2006 1 02 PM 17996 Hey guys I m new to the new forum and need some help I ve written a script which changes a drawing s coordinate system using the CoordinateConverter object My VBA script see below works but it is magnitudes slower than performing the same task manually using the GUI For example I have a fairly high point detail drawing containing approximately 2200 objects When I reproject the original drawing manually it takes roughly 7 seconds to finish When I perform the same exact operation programmatically using the follow
338. s Add Col n Name n Type ns Add Col n Name n Type n Size ns Add Column Col Eccentricity Col umn Col CoordSys XML Col 2000 For Col maj Col umn um nTypeFloa mns NewCol orAxis mnTypeFloa mns NewCol mnTypeFloa mns NewCol um nTypeWTex Set CoordSys Set CoordSys ParmSet RecordSet AddNew Set Record Record Record Record Record Record Record Record Record Record Record Record Record Record Record Record Record Nex Da Dat Da Da Dat Da Da Da Da Da Da Da Da Da Da Da Y ta ta ta ta ta ta MapLayer Datum ta FalseEasting ta FalseNorthing ta majorAxis Eccen tricity CoordSys Table Open FalseNorthing Col t64 umn t64 umn t64 umn Each MapLayer in MapLayers Set Component RecordSet CoordSys Table RecordSet MapLayer Component Component CoordinateSystem CoordSys ParameterSet RecordSet LastAdded Component Name CoordSys Name EllipsoidName CoordSys Unit ta localOffsetX ta localOffsetY ta localScaleX ta localScaleY m j ta CoordSys XML ta ScaleCorrectionX ta ScaleCorrectionY CoordSys CoordSys CoordSys CoordSys CoordSys CoordSys CoordSys ParmSet Item localScaleX CoordSys ParmSet Item localScaleY CoordSys
339. s Count Set Objs Component ObjectSet Prog Progress Min 0 Prog Progress Max RecordCount SBar ProgressReport Panels 2 Text in HRUDAT Each Obj in Objs For Metres to Nautical Miles conversion factor cStr RecordCount amp Component Index temByName HURDAT 2004 Drawing temByName HURDAT Projected Drawing Records 0 000539594075 Length nm Speed Round Length nm 6 0 1 OBjId Obj ID RecordID Records ItemByID ObjID Set Record Records Item RecordID Record Data SysSpd Manifold Speed If RecordID Mod 100 0 Then DO NOT update the bars too often bog down code exection Bar ProgressReport Panels 1 Text 09 Obj Geom Length 0 000539594075 Doing so will cStr RecordID 221 Prog Progress Value RecordID End IF Next Form Visible False End Sub VK KK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK KEK KK Sub Update SysSpd via Records Dim Document Components Component Dim Owned Table Dim Obj Objs Dim Length nm Speed Dim Record Records TotalRecords RecordCounter Set Document Application ActiveDocument Set Components Document ComponentSet Set Component Components Components ItemByName HURDAT 2004 Drawing Set Owned Table Component OwnedTable Set Records Owned Table RecordSet Set Objs Compone
340. s Count Then Set box comp ObjectSet GeomSet box printBox True End If Case Else End Select If printBox Then Debug Print Box amp vbCrLf Debug Print Width x Height amp box Width amp x amp box Height amp vbCrLf Debug Print Area amp box Area amp vbCrLf Debug Print XMin WestBC amp box XMin amp vbCrLf Debug Print XMax EastBC amp box XMax amp vbCrLf Debug Print YMax NorthBC amp box YMax amp vbCrLf Debug Print YMin SouthBC amp box YMin amp vbCrLf printBox False End If End Select Next report Open End Sub 108 Reset Orthographic Projection Centre to Map Window Centre http 69 17 46 171 Site Thread aspx id 2327 amp ti 632 176735200000000 mdsumner on 4 15 2004 1 10 AM 2328 Hi here s a simple script that some might be interested in With a map in Orthographic projection open as the active window this script will set the centre latitude and longitude of the map s View Projection to the centre of the window If the active window is not a map nothing happens I m using this to view an image of the world with the map in Orthographic projection it gives a sort of functionality to display a globe and rotate the view to where you want it without using the projection dialog I use the Center Point tool on the open map window then run the script to reset the projection s centre 1 Create a map a
341. s will make the code more robust Under certain circumstances the name of the ID column might differ from ID and the names of the intrinsic columns might not end with I An alternative idea is to create a query to select the duplicate objects eg SQL SELECT FROM Drawing WHERE ID NOT IN SELECT First ID FROM Drawing GROUP BY Columnl Column2 Save Drawing Names to a Column I have around 700 drawings imported by script in a folder in a map project and want to get the drawing name into a field in a column called Name for each Could someone please point me in the right direction to do this To complicate things I just need the name without the appended drawing that comes with importing a drawing Thanks 304 See the attachment DrawingNames 2 TableColumn map Option Explicit 129 2 ese ke 2 ok de ok e ok de ok sek sek se ok 2 I ke CI CI CA 2A 2A 2 a 2 2 2 2 a ok oa a a ae ae Sub Main Dim Comp Comps Dim Cols Col Dim Ory Dim Tbl Rcrd Rcrds Lorne Ketch Dec 11 2006 LKetch at hfx l1st dot eastlink 2nd dot ca Collects Drawing names and saves them to Table Drawing Names Column Name NOT If the Drawing Name ends with Drawing that portion of the name is deleted Example My Drawing becomes My My Drawing 2 will not be changed t Set Comps Document ComponentSet Drawing Names One column table
342. sA ItemByID object ID Set recordB recordsB recordsB ItemByID objectsB LastAdded ID add object name recordB Data Name recordA Data Name Next End Sub Create a Record Create new record in table C and fill it with data Sub Main Set components document ComponentSet Set table components components ItemByName C Set records table RecordSet instantiate to use LastAdded property add record records AddNew Set record records LastAdded add record data record Data Name Atlanta record Data Pop 1200000 18 End Sub CopyObjects copy a selection to a new drawing Copies objects selected in active drawing into a new drawing Fields are NOT transferred Sub Main Dim windows window drawing drawingTarget object objects objectsTarget Set windows Application WindowSet ensure there is at least one opened window If windows Count 1 Then Exit Sub End If Set window windows ActiveWindow ensure active window contains drawing If window ActiveComponent Type ComponentDrawing Then Exit Sub End If Set drawing window ActiveComponent Set objects drawing Selection ensure there is at least one selected object If objects Count 1 Then Exit Sub End If create new drawing Set drawingTarget document NewDrawing drawing Name amp Selection Set objectsTarget drawingTarget ObjectSet inherit coordinate sys
343. sCount SecondPt 1 cos 2 Pi PtsCount SecondPt 1 X CenterX Radius Y CenterY Radius BrsLn 0 PointSet 1 X X BrsLn 0 PointSet 1 Y Y Drawing ObjectSet Add Application NewGeom GeomLine BrsLn Next KM ox o OX ox close file Stream Close open imported drawing Drawing Open Else Application MessageBox File not found End If End Sub Import Release45 Text File Imports file produced by Release 4 5 Write Text File solver to a new drawing Sub Main ask for filename FileName InputBox File name Input Set FSO CreateObject Scripting FileSystemObject If FSO FileExists FileName Then open file Set Stream FSO OpenTextFile FileName 1 create new drawing Set Drawing Application ActiveDocument NewDrawing Release45 Text read entire fil Do While Stream AtEndOfStream True 22 read object type and number of branches ObjHeader Do While Stream AtEndOfStream lt gt True And ObjHeader ObjHeader Trim Stream ReadLine Loop If Stream AtEndOfStream Then Exit Do Header Split ObjHeader If UBound Header 1 Then Exit Do read points Set Brs Application NewBranchSet ObjType CInt Header 0 PtsCount CInt Header 1 Set Pts Application NewPointSet For i 0 to PtsCount 1 TextLine Stream ReadLin Location Split TextLine Set Pt Application NewPoint
344. sageBox Column amp columnName amp is not numeric Exit Sub End If create new column or reuse existing column quartileName columnName Quartile columnlIndex component columnSet ItemByName quartileName createNew Fals 24 If columnIndex lt 0 Then createNew Tru ElseIf Not component columnSet columnindex IsTypeNumeric Then createNew Tru End If If createNew Then Set columnNew component ColumnSet NewColumn columnNew Name quartileName columnNew Type ColumnTypeInt32 component ColumnSet Add columnNew quartileName component ColumnSet LastAdded Name End If compute frequency breaks minValue records Minimum columnName Item 0 Data columnName maxValue records Maximum columnName Item 0 Data columnName range maxValue minValue 4 Rl minValue range R2 Rl range R3 R2 range process records For index 0 To records Count 1 Set record records index value record Data columnName If value gt R3 Then record Data quartileName 4 seIf value gt R2 Then record Data quartileName 3 self value gt R1 Then record Data quartileName 2 Else record Data quartileName 1 End If Next End Sub A A Random Points creates a drawing with points randomly taken from Data Table Create Random Points Creates a drawing with points taken from the Data table P
345. spx 1d 18945 amp ti 632753461463730000 Greetings I am trying to implement a dissolve function in C so that I can automate the processing of map objects in numerous maps doing dissolve by hand gets tedious fast From what I can tell based on comments here and my own experiences the correct approach appears to be to select the desired objects in the drawing get the GeomSet from Drawing Selection GeomSet and then apply the Union method to return the combined geometry When I do this however none of my column data for the old geometry transfers to the new object I get a new unified object but its data fields in the drawing table are all set to their 226 default values I do have transfer rules set to Copy Copy Manually applying the Union transfrom in the toolbar does the right thing The script however loses the data Here s a C snippet U CH Application app Context Application Document doc Document app ActiveDocument ComponentSet cset doc ComponentSet ObjectSet oset Drawing dwg Drawing cset Messy Drawing oset dwg Selection if oset Count gt 0 GeomSet gset oset GeomSet Geom geo gset Union dwg Epsilon gset dwg Selection GeomSet dwg Clear true oset dwg ObjectSet if geo null oset Add geo Am I doing something wrong Or is there more to this than I think SS Note that I was able to get this working I Just had to copy the column data myself in the
346. st SurfaceTransformDifferenceNorthWest SurfaceTransformDifferenceSouth SurfaceTransformDifferenceSouthEast SurfaceTransformDifferenceSouthWest SurfaceTransformDifferenceWest SurfaceTransformFlipHorizontally SurfaceTransformF lip Vertically SurfaceTransformHighPass1 SurfaceTransformHighPass2 SurfaceTransformHighPass3 SurfaceTransformInterpolate SurfaceTransformInterpolateParameter SurfaceTransformInterpolateRow SurfaceTransformInvert SurfaceTransformLaplacel SurfaceTransformLaplace2 SurfaceTransformLowPass1 SurfaceTransformLowPass2 SurfaceTransformLowPass3 SurfaceTransformMedianCross SurfaceTransformMedianSquare SurfaceTransformMedianSquare5 SurfaceTransformRotate SurfaceTransformSharpen SurfaceTransformSharpenMore SurfaceTransformSharpenParameter SurfaceTransformThresholdLower SurfaceTransformThresholdUpper SurfaceTransformTile SurfaceTransformTileMedian SurfaceUnlink SurfaceWatersheds TableBestFit TableBestFitAll TableBestFitTitles TableColumnA dd TableColumnAddRank TableColumnAddRankAdd TableColumnAddRankDelete TableColumnAddRankProperties TableColumnAddRankShowTypes 271 TableColumnAddScript TableColumnChangeType TableColumnCopy TableColumnCut TableColumnDelete TableColumnEdit TableColumnEditScript TableColumnFind TableColumnFlatten TableColumnFlattenAll TableColumnFormat TableColumnHide TableColumnldentity TableColumnLanguage TableColumnMoveDown TableColumnMoveToBottom TableColumnMoveToTop TableColumnMoveU
347. sting Geom I Binary Column Data Not Equal a GEOM Object http forum manifold net Site Thread aspx id 32618 amp ti 633023275408900000 I am trying to get the Geom I object in c by Double x Manifold Interop Geom rs get Data Geom I Center X where rs isaManifold Interop Record I keep getting the error message Unable to cast object of type System Byte totype Manifold Interop Geom Is there a work around Thanks You re on your own with C but I can tell you that the binary data stored in the column doesn t equal a geom object Use something like this to get a geom object VB Application NewGeomFromBinary Record Data geom i Also I would venture a guess that there are much better ways to get a geom than this Just for one you could use record object geom 264 thanks a bundle your suggestions were enough for me to figure out the correct syntax double xl Manifold Interop Object rs Object get Geom Center X c can be a real pain sometimes Newlmport Problems External Database Connection Fails http forum manifold net Site Thread aspx id 30605 This may be fixed in Build 7 1 14 917 L Ketch The ADO NET imports do not work due to a bug I have filed a request to fix the bug in the nearest update The OLE DB import seems to work VB NET Imports M Manifold Interop Imports Manifold Interop Scripts Class Script Shared Sub Main Dim iadonet As M ImportOleDb Context Ap
348. system preset in the first 50 or so characters of the XML between name and name Adam Wachowski Manifold Development Team Yo kk ck ck ck ck ck Ck ck kk Ck Sk Ck Ck ck Ck ck Ck ck Ck ck Ck ck Ck ck ck Ck ck ck ck Sk ck ck ck ck kk ck kk ck ko Sk ck Mk ko ke ko ko kv ko ko ko ko kk Option Explicit http 69 17 46 171 Site Thread aspx id 20894 amp ti 632918264627670000 Sub Main L Ketch April 9 2006 Dim Document Dim Component Dim CoordSys_Table Dim Column Columns Dim Record Recordset Dim ActiveWin Dim CoordSys CoordSys ParmSet Dim MapLayer MapLayers Set Document Application ActiveDocument Set ActiveWin Application WindowSet ActiveWindow If ActiveWin Component Type ComponentMap Then Application MessageBox The Active Window must be a Map Exit Sub End If Set MapLayers ActiveWin Component LayerSet Delete Component Layer CoordSystems Set CoordSys Table Document NewTable Layer CoordSystems Set Columns CoordSys Table ColumnSet Set Column Columns Item 0 Column Name MapLayer Column Type ColumnTypeWText Column Size 100 Set Column Columns NewColumn Column Name CoordSys Name Column Type ColumnTypeWText 212 Col Col Set Col Col Col Col Set Col Col Col Col Set Col Col Col Col Set Col Col Cot Set Col Col Col Set Cok Col Col Set Col Col Col Set Col Col Col Set
349. t If Windows Count 0 Then Application Messagebox No active component Exit Sub End If fail If there are no opened windows Set window Windows ActiveWindow Set drawingIn Window Component If drawingIn Type ComponentMap Then drill down to active layer Set drawingIn Window ActiveComponent End If If Not drawingIn TypeName Drawing or drawingIn TypeName Drawing Then Application Messagebox Invalid active component Exit Sub End If Else False hardcoded name for testing Set drawingIn comps A End If S InputBox Drawing to add mileposts to must exist drawingIn Name amp Mileposts Set drawingOut Application ActiveDocument ComponentSet s get selected objects Set objects drawingIn selection If objects count 0 Then Set objects drawingIn ObjectSet 200 End If If objects Count lt gt 1 Then Application Messagebox This script can only operate on one line at a time Exit Sub End If Set Object Objects 0 If Object TypeName lt gt Line Then Application Messagebox This script can only operate on one line at a time Exit Sub End If Set pt2 object Geom BranchSet 0 PointSet 0 drawingOut ObjectSet Add Application NewGeom GeomPoint pt2 start post legLen CDb1 0 distance remaining to next milepost For Each Branch In Object Geom BranchSet For I 1 to Branch PointSet Count 1 Set ptl pt2 Set pt2
350. t Scanning table ecords Count amp records Count 1 Then Set pointSet Application NewPointSet Set geom Application NewGeom GeomPoint pointSet Set objectSet drawing ObjectSet append centroid to drawing objectSet Add geom select newly created centroid objectSet LastAdded Mask 1 End If cities 1 county countyNew x xNew y yNew Else cities cities 1 xX x xNew y y yNew End If Next Application StatusText Done End Sub amp of 14 amp Create Weighted Centroids Traverses Cities drawing adding weighted centroid of a set of cities for each county Weight of city is taken from its population field Sub Main Set components document ComponentSet locate target drawing Set drawing components components ItemByName Cities locate and execute helper query Set query components components ItemByName Cities by County Set table query Table Set records table RecordSet county weight 0 x 0 y 0 Application StatusText Scanning table scan queried table creating centroids as necessary For recordIndex 0 To records Count 1 Application StatusText Scanning table CStr records Count amp Set record records recordIndex acquire record data countyNew CStr record Data County amp CStr recordIndex 1 weightNew CDbl record Data Population
351. t http lists directionsmag com discussion read php f 29 amp i 4 1391 amp t 41391 No answer but the code looks interesting LAK I m new to the new forum and need some help I ve written a script which changes a drawing s coordinate system using the CoordinateConverter object My VBA script see below works but it is magnitudes slower than performing the same task manually using the GUI For example I have a fairly high point detail drawing containing approximately 2200 objects When I reproject the original drawing manually it takes roughly 7 seconds to finish When I perform the same exact operation programmatically using the following script it takes about 70 minutes Would someone look at the script below and let me know if I m doing something wrong or can otherwise provide insight on how to achieve a higher level of performance 115 Note in my test the drawing being converted is in lat long and I m converting it to Transverse Mercator NAD 1983 using the script Thanks in advance for any help you guys can offer Option Explicit Sub Main Dim doc windows window dwg set doc Application ActiveDocument Set windows Application WindowSet ensure there is at least one opened window If windows Count 1 Then Exit Sub End If Set window windows ActiveWindow ensure active window contains drawing If window ActiveComponent Type ComponentDrawing Then Exit Sub End If set dwg windo
352. t ImageTransformDifferenceSouthWest ImageTransformDifferenceWest ImageTransformDiffuse ImageTransformEqualize ImageTransformF lipHorizontally ImageTransformFlipVertically ImageTransformGamma ImageTransformGaussianBlur ImageTransformGrayscale ImageTransformHighPass1 ImageTransformHighPass2 ImageTransformHighPass3 ImageTransformInvert ImageTransformInvertAt ImageTransformLaplacel ImageTransformLaplace2 ImageTransformLowPass1 ImageTransformLowPass2 ImageTransformLowPass3 ImageTransformMedianCross ImageTransformMedianSquare ImageTransformMedianSquare5 ImageTransformMotionBlurDiagonall ImageTransformMotionBlurDiagonal2 ImageTransformMotionBlurHorizontal ImageTransformMotionBlurVertical ImageTransformPosterize ImageTransformRotate ImageTransformSharpen ImageTransformSharpenMore ImageTransformSharpenParameter ImageTransformThreshold ImageTransformThresholdBlack ImageTransformThresholdWhite ImageTransformTile ImageTransformTileMedian ImageUnlink ItemsSelectAll ItemsSelectInverse ItemsSelectNone LabelsLabelBranchDelete LabelsLabelBranchDuplicate LabelsLabelBranchSnap LabelsLabelBranchSplit LabelsLabelCenter LabelsLabelCoordinateAdd LabelsLabelCoordinateAddMidSegment LabelsLabelCoordinateAddOnSegment LabelsLabelCoordinateDelete LabelsLabelCoordinateDeleteSplitBranch LabelsLabelCoordinateDuplicate LabelsLabelCoordinateSnap LabelsLabelCoordinates LabelsLabelCoordinatesAddBranch LabelsLabelCoordinatesAddPoint LabelsLabelCoordina
353. t Sob Components document Component ser Set windows Application WindowSet fail if there are no opened windows If windows Count 0 Then Application MessageBox No active window Exit S b End TE Set window windows ActiveWindow Set component window Component If component Type ComponentMap Then drill down to active layer Sample Code Provided by Manifold on Their Free Stuff Page http www manifold net products freestuff html Azimuth Lines creates lines using azimuth amp distance pairs stored in table Create Lines by Azimuth and Distance Pairs Creates lines using set of azimuth and distance pairs stored in table Lines Table structure Name name used to uniquely identify the line Seq sequential number of record within the line X X of starting location or azimuth to next location Y Y of starting location or distance to next location Sub Main Set components document ComponentSet locate and execute query queryIndex components ItemByName Lines Query If queryIndex 0 Then Application MessageBox Lines Query can not be found Exit Sub End If Set query components queryIndex Set queryTable query Table create new drawing Set drawing document NewDrawing Drawing obtain drawing table and equip it with Name column Set drawingTable drawing OwnedTable Set drawingName drawingTable ColumnSet NewColumn drawingName Name Nam
354. t Retrieve_Column_Names map Option Explicit VK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KK ko Mk Sk kv kx k ko ko ko ko kockok Sub Main Dim Comps Tbl Dim Column Names Dim Index Dim Report Dim OK Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca Set Comps Document Componentset Set Tbl Comps HURDAT 2000to2005 Table OK Collect Column Names 3 Tbl Column Names FALSE FALSE If NOT OK Then Exit Sub I For Index 0 to uBound Column Names Report Report amp Column Names Index amp VbCrLf Next Report Report amp VbCrLf amp Identity Column amp VbCrLf amp _ Identity Column Name Tbl Application Messagebox Report End Sub Yo Ckok ck ck Ck ck kk Sk C Ck CK Ck Ck Ck Ck Ck Ck Ck KC CK Ck Sk CC Sk CC kk Ck Ck Ck Ck Ck Sk Sk Sk kk Sk Sk Sk kv Kk ko kv kx k ko kock ko kock ok Private Function Collect Column Names _ ByRef Column Class ByRef Tbl _ ByRef Column List ByRef Sort _ ByRef Descending 308 Author Lorne Ketch Email Ketch atJhfx dot eastlink ca Column Class VALUES 1 Regular Columns Only i 2 ID Regular Columns 3 All ID Regular Columns Intrinsics 4 Intrinsics Only 5 ID Only not the best function to extract a single value Tbl a Manifold Table Object Column List an unitialized Dynamic Array Sort sort the List
355. t add application newPoint newxmax newymax PSet add application newPoint newxmin newymax Set NewG application NewGeom GeomArea PSet Set comps application ActiveDocument componentSet Set drwng comps Drawing Set OSet drwng ObjectSet OSet Add NewG End Sub There may well be a better way to achieve what you want if you give us more context Thanks a lot for your help Sorry for not being more clearer Since you have given me a sample of the script but 1 still want to know how do u used this syntext 288 Rect NewRect Number mixX Number minY Number maxX Number maxY which i got it from the help manual It just says creates new rectangle object with specified coordinates So when i used this i dont c the graphical representation of the rectangle If i m not mistaken it just returns the bounding box So what additional script do 1 need to add in order to see the rectangle Thanks mdsumner at 3 29 2006 7 01 PM 20009 You have to add the bounding box as implicit in the Rect object as a Geom object to a drawing then view the drawing If you create the Rect first you would then obtain the bounding coordinates by querying its Xmin Xmax etc properties newrect application NewRect newxmin newymin newxmax newymax Set PSet application NewPointSet PSet add application newPoint newrect xmin newrect ymin PSet add application newPoint newrect xmax newrect ymin etc and proce
356. t in some cases putting in this sleep actually wrecks the flow of the sendkey command and yet other times its vital just another thing to play with You Cannot Instantiate the Root of the WSH Object Model WScript brbkr on 9 26 2005 10 39 AM 15052 What I am trying to do is use SendKeys commands from a script to accomplish something that can only be done through the Manifold GUI See WillH s 4 14 05 post in General Scripting Questions regarding the PasteAs command and importing a table as a drawing But I can t seem to directly reference the WScript root object of the Windows Script Host Object Model I can do the following and pull down the file menu as desired Sub Main Set WshShell CreateObject WScript Shell WshShell SendKeys f End Sub But if I use the prescribed code as follows I get the error Object required WScript Line 2 263 Sub Main Set WshShell WScript CreateObject WScript Shell WshShell SendKeys Sf WScript Sleep 500 End Sub Using the former code would be OK except I need to reference the WScript object to use the WScript Sleep command and make the code execute properly Any help would be greatly appreciated Better late than never Your answer is here http blogs msdn com ericlippert archive 2003 10 08 53175 aspx 53176 Basically if you re working in manifold you can t instantiate the root of the WSH object model wscript or any of its associated methods Ca
357. taXl zC ZA deltaX2 zF zD deltaX3 zI zG deltaYl zA zG deltaY2 zB zH 36 deltaY3 zC zI deltaX deltaX1 deltaX2 deltaX3 deltaY deltaYl deltaY2 deltaY3 3 scaleX 3 scaleY compute slope slope Sqr deltaX 2 deltaY 2 2 translate slope to percents If slope gt 1 Then slope 200 100 slope Else slope End If If slope lt slopeMax Then pixel Mask pixel Mask Or 1 Else pixel Mask pixel Mask And Not 1 End If End If slope 100 Nex turn batch updates off app ActiveDocument BatchUpdates False app StatusText Done End Sub VK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko Gk ko ko compute height of given pixel Function PixelZ surface pixels pixelX pixelY z If pixelX 0 Then PixelZ z ElseIf pixelY lt 0 Then PixelZ z ElseIf pixelX gt surface Width Then PixelZ z ElseIf pixelY gt surface Height Then PixelZ z Else Set pixel pixels pixelX pixelY surface Width If pixel IsMissing Then PixelZ z Else PixelZ pixel Value End If End If End Function 37 Table Generic selects all records with value in an active column equal to that in the active cell Select Same Year Month to Active Sub Main Set windows Application WindowSet Set window windows ActiveWindow Set component window Component If component Type
358. tabladibujo ColumnSet columnsdibujo Add col Adding Columns to a Table via Script Manifold COLUMN ENUMERATIONS obtain drawing table and add a Name column Set DrawingTable Drawing OwnedTable Set NewColumn DrawingTable ColumnSet NewColumn NewColumn Name Name NewColumn Type ColumnTypeWText see enumerations below DrawingTable ColumnSet Add NewColumn To insert data into the new column use the Data property Insert data for the last record in the recordset Set Last Record drawingTable RecordSet Count 1 Or Set Last Record drawingTable LastAdded Last Record Data Name Name MANIFOLD COLUMN ENUMERATIONS ColumnTypeAChar ANSI character ColumnTypeAText ANSI text variable length or fixed length ColumnTypeBinary Binary data variable length or fixed length ColumnTypeBoolean Boolean value ColumnTypeCoordSys Coordinate system ColumnTypeCurrency Currency ColumnTypeFloat32 Single precision floating point number ColumnTypeFloat 64 Double precision floating point number ColumnTypeGeom Geometric shape ColumnTypeGeomSHP Geometric shape in ESRI SHP format ColumnTypeGeomWKB Geometric shape in OpenGIS WKB format ColumnTypeIntl16 16 bit integer number ColumnTypeIntl6U Unsigned 16 bit integer number ColumnTypeInt32 32 bit integer number ColumnTypeInt32U Unsigned 32 bit int
359. tch at hfx dot eastlink ca Document ComponentSet Comps ItemByName ComponentName Exit Sub Comps Remove Component_ Index End Sub 241 VK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKEK Paste As Component Type returns new component Index http forum manifold net Site Thread aspx id 22518 Private Function Document PasteAs ByRef ComponentType Constant Author Lorne Ketch Email LKetch at hfx dot eastlink ca ComponentType Constant can be one of the following Manifold ComponentType Constants ComponentChart ComponentComments ComponentDrawing ComponentElevation ComponentFolder ComponentForm ComponentImage ComponentLabels ComponentLayout ComponentMap ComponentNull Invalid value Typically used in initialization ComponentPalette ComponentProfile ComponentQuery ComponentScript ComponentSurface ComponentTable ComponentTerrain ComponentZones Background It is common for Manifold programmers to obtain the Index of a new component pasted from the clipboard by using the Count property of the ComponentSet in the manner shown below In this example both the Drawing and its associated table will be pasted in that order and we must subtract 2 from the ComponentSet Count property Drwg Copy TRUE Document PasteAs ComponentDrawing Set New Drawing Comps Item Comps Count 2 There is no guarantee that ComponentSet Count 2 will reference the
360. te When the populate parameter is set to True the system automatically populates the labels component with a label for each drawing object Bound Labels Created by Script do Not Display http 69 17 46 171 Site Thread aspx id 22339 amp ti 632854363953230000 Lorne at 6 8 2006 4 36 AM 22340 The VBscript below assigns the column name Labels_E to the Text property of the Labels_E object The Label component is created fine and the correct field is shown in the Labels Text menu dialog However the labels do not appear when the component is opened I can change the column using the Labels Text menu but the labels still do not appear The labels immediately display if I save the project I don t see a Labels Refresh method or anything similar What am I missing Thanks Lorne Document NewLabels Temp Str amp Labels E Points TRUE Set Labels E Comps Item Comps Count 1 ijaAbels E Text Labels E aabels E Synchronized TRUE aabels E PerLabelFormat TRUE GEC Lorne at 6 8 2006 10 24 AM 22384 Sorry for the post I have to add each label object to Labels_E LabelSet For Counter 0 To Points ObjectSet Count 1 Set Label Point Points ObjectSet Counter Labels E LabelSet Add Label Point Label Point Geom Next Just for interest why does Manifold automatically add the labels for you when you Save the project Lorne 186 It does this because you have s
361. tem from original drawing drawingTarget CoordinateSystem drawing CoordinateSystem batch updates for performance document BatchUpdates True copy all selected objects to newly created drawing For index 0 To objects Count 1 Set object objects index copy object objectsTarget Add object Geom Next flush accumulated updates document BatchUpdates False open created drawing drawingTarget Open End Sub 19 Forms demonstrates the use of several basic Form controls 1 ck ck ck ck ck ck Ck ck kk 0k Ck Ck ck Ck Ck C ck KKK KKK KKK KKK KK KKK KK KKK KKK KKK KKK KKK KKK KKK ko Sk Sk Mk kx k ko ko ko ko kocko Sub Main Form Visible True End Sub Yo kk ck ck KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK Mk k ko kock ko kock add some items to list on startup Sub Form OnLoad List AddItem Item 1 List AddItem Item 2 List AddItem Item 3 End Sub VK KK ck ck ck ck C Ck Sk Ck Ck Sk Ck Ck Ck Ck ck Ck ck Ck ck Ck ck kk ck KKK ck ck ck kk kk ck ck kk kk ck kk ck ck ck ko Sk ck Sk Sk ko ko Sk Mk kx k ko ko ko ko kockok add new item to list Sub Add Click List AddItem Text Text End Sub 1 ck ck ck ck ck ck C Ck Sk Ck Ck Ck Ck Ck Ck Ck ck Ck Ck Ck ck ck ck Sk ck ck Ck ck kk ck ck kk kk ck ck kk ck ck kk ck ck ck kk ck Sk Sk ko Sk Sk Mk kx k ko ko ko ko kockok remove selected item from list if any Sub Delete Click If List SelCount 0 Then For
362. tena ss sess ente ten ns deseen tete annis 174 Layer Code turnon ofM DMS 3 5 i pu e rt i e RD bte te a aa a Eiaa 175 How to have Some Layers Unchecked when a Webpage is Loaded see 176 Set Layer to Layer Off 5 eed e aet No Et echt e FU XO M LI Sues 177 Published Layers es beu e E RM tee e tete eb ae e PS ERE ORA 179 How to Disable Layers on Startup eese eene eene trennen eene reine eren enee rennen 181 IL NIU B E H HE E 185 ADDING EABEES VIA CODES c teceocte ettet eva et etre E coe EU Ee eventu 185 CREATING BOUND DABEES 5 iecit eter eG reete cach eet tue bre v B RETO eo Per teeds 185 BOUND LABELS CREATED BY SCRIPT DO NOT DISPLAY ccccccccccessessseceeeccesesssaececececseseuecesececeeceaeseeeeecsenenssaeees 186 SCRIPT TO PLACE LABELS ON POINT OBJECTS cccsssssscecccecsessnsececececsessnsececececsessseaecececsessseaeeececsesenseaeeeceesesensea 188 ADDING LABELS AT X Y POINTS TO AN UNBOUND LABEL COMPONENT cceeceeeeeeeen e eee e nenne eere ee nnne nennen enn 189 SET LABEL ROTATION BASED UPON A COLUMN VALUE cicer eneetnn annees enne terna natns stent rena asse ee entra 190 JB SOIN Lc REG 191 APPLYING A LAYOUT TEMPLATE TO DIFFERENT LAYOUTS eee een nen enhn nnn nnne n nean nn ann napa p apap nua 191 AUTOMATE LAYOUT CREATION n a a eet oet eve ec eve EA go eu aee esee ce
363. ters are ten times what they should be Adam Wachowski 09 13 2005 12 25 AM Thanks Adam That script seemed to do the trick All areas look good now Haven t solved the unit problem though because the parameters look ok for the NZMG projection Cheers Anne 09 14 2005 5 34 AM Euclidean area is the literal area value you would get when determining the area using the coordinate system of the data Imagine drawing a shape on a lat lon plot if you use the literal x and y values in that plot it won t be the same as if that area were drawn on the Earth s spheroid Try drawing a Geographic Circle on a lat lon map and other projections and you ll see it clearly All intrinsic values except for Bearing I are calculated this way so the intrinsic values are dependent upon the projection you are using 67 I m not sure why the Bearings don t behave as the others do but I m sure it s to do with the fact that bearings are a little more screwily dependent on the coordinate system and how you are defining what is meant by direction 09 14 2005 9 26 AM Another term for it is spherical excess you get it both in areas and angles The contained angles of a triangle drawn on a planar surface will total 180 degrees When drawn on a spheroid they will total more how much more depends on the ratio between the size of triangle and the size of the sphere If you can imagine the skin of the sphere delineated by the triangle it would appear t
364. tesBreakBranch LabelsLabelCoordinatesDelete LabelsLabelCoordinatesDeleteBranch LabelsLabelCoordinatesMoveDown LabelsLabelCoordinatesMoveToBottom LabelsLabelCoordinatesMoveToTop LabelsLabelCoordinatesMoveUp LabelsLabelCoordinatesNative LabelsLabelCopy LabelsLabelCut LabelsLabelDelete LabelsLabelDuplicate LabelsLabelEdit LabelsLabelOrthogonalize LabelsLabelPaste LabelsLabelPasteAppend LabelsLabelSegmentDelete LabelsLabelSegmentDeleteSplitBranch LabelsLabelSegmentize LabelsLabelSimplify LabelsLabelSnap LabelsOpenDrawing LabelsOpenTable LabelsOrthogonalize LabelsPerLabelFormat LabelsSegmentize LabelsSimplify LabelsSnap LabelsSynchronize LabelsText LabelsUnlink LayoutElementBestFit LayoutElementColumnsMoveDown LayoutElementColumnsMoveToBottom LayoutElementColumnsMoveToTop LayoutElementColumnsMoveUp LayoutElementColumnsSelectAll LayoutElementColumnsSelectInverse LayoutElementColumnsSelectNone LayoutElementCopy LayoutElementCut LayoutElementDelete LayoutElementEdit LayoutElementMoveDown LayoutElementMoveToBottom LayoutElementMoveToTop LayoutElementMoveUp LayoutElementOpen LayoutElementOpenInNew Window LayoutElementPaste LayoutElementPasteAppend LayoutElementProperties LayoutHide LayoutLockCenterScale LayoutLockRectangle LayoutOpen LayoutPages LayoutPrint LayoutProperties LayoutTemplateApply LayoutTemplateApplyFile LayoutTemplateSave LayoutZoom MapAddLayers MapAddLayersMoveDown MapAddLayersMoveToBottom Ma
365. thToken TableQueryTop TableQueryTypical TableQueryUniques TableRecordAdd TableRecordCancel TableRecordClear TableRecordCoordinates TableRecordCopy TableRecordCut TableRecordDelete TableRecordFilter TableRecordMore TableRecordMoreLikeThis TableRecordMoreLikeThisSorted TableRecordPaste TableRecordPasteAppend TableRelations TableRelationsAdd TableRelationsDelete TableRelationsIncludeAll TableRelationsIncludeInverse TableRelationsIncludeNone TableRelationsProperties TableRelink TableSendEmail TableStandardize TableTransformAdd TableTransformAppend TableTransformArcCoTangent TableTransformArcCosine TableTransformArcSine TableTransformArcTangent TableTransformArithmeticSeries TableTransformBinaryAnd TableTransformBinaryNot TableTransformBinaryOr TableTransformBinaryXor TableTransformClear TableTransformCoTangent TableTransformCopy TableTransformCopyDay TableTransformCopyDayName TableTransformCopyDayOfWeek TableTransformCopyDayOfYear TableTransformCopyFirstToken TableTransformCopyHour TableTransformCopyLastToken TableTransformCopyMinute TableTransformCopyMonth TableTransformCopyMonthName TableTransformCopyPercentage TableTransformCopyRecordDeviation TableTransformCopyRecordVariation TableTransformCopyRunningProduct TableTransformCopyRunningSub TableTransformCopyRunningTotal TableTransformCopySecond TableTransformCopyUrlObject TableTransformCopyUrlParameters TableTransformCopyUrlPort TableTransformCopyUr Protocol TableT
366. the document containing the script if you are using Manifold in the context of a web site or external application Adding a new predefined object is always a breaking change and requires making adjustments to existing scripts that use the name of the new object In this case we think the change is worth the hassle since it allows script writers to write scripts that can run seamlessly both in interactive and programmatic sessions of Manifold We recommend that you always use the Document object and only resort to Application ActiveDocument when you are sure this is what you need since it only works for interactive sessions of Manifold Hence it would perhaps be best to fix your case VBScript Set document Application ActiveDocument by removing this line or commenting it out Accessing the Records LastAdded Object http 69 17 46 171 Site Thread aspx id 2 1549 amp ti 63284 1335964730000 adamw at 5 24 2006 6 32 AM 21610 As suggested by Will change the following code in cmdGeocode_ Click VBScript Do While Not rs eof objects Add Application NewGeom GeomPoint point Set record records LastAdded Loop to 284 VBScript Do While Not rs eof objects Add Application NewGeom GeomPoint point Set record objects LastAdded Record Loop Now to clarify what has been mentioned by Art In 6 50 the LastAdded property was sometimes bound to a physical object manipulated by the relevant script object
367. thematic settings This will give you a range of foreground background style and size values which you can then access with Formatting and set individually See code below mColumn some column object mDrawing LineForeground SetUniqueValues mColumn For 1 0 To mDrawing LineForeground Values Count 1 mDrawing LineForeground Values i Formatting gApplication NewColor x R G B Next mDrawing Refresh Calling One Script from another Script Date Thu 02 16 2006 3 35 AM From Adam Wachowski adamw manifold net To Manifold List Subject Re Manifold 1 May I know how to call a script in ASP code http lists directionsmag com discussion read php f 29 amp i 4 1563 amp t 41548 gt May I know how to call a script in ASP code 224 Similarly to calling a script from another script var scr mapserver Document ComponentSet Script scr Run The called script should not reference the ActiveDocument property of the Application object and should instead locate the document in the DocumentSet collection of the same object A NET script can also obtain the document using the Document property of the Context object Adam Wachowski Proper way to Assign an Object to a Component Added by the NEW Method From Adam s comment in the Bound Labels Created by Script do Not Display topic http 69 17 46 171 Site Thread aspx id 22339 amp ti 632854363953230000 one should assign an object variable to a ne
368. ties ViewSelections ViewSelectionsAdd ViewSelectionsDelete ViewSelectionsPreview ViewSelectionsSelectAdd ViewSelectionsSelectIntersect ViewSelectionsSelectInvert ViewSelectionsSelectReplace ViewSelectionsSelectSubtract ViewSort ViewSortMoveDown ViewSortMoveToBottom ViewSortMoveToTop ViewSortMoveUp ViewSortUseCase 274 ViewSortUselnterior Whitespace ViewSortUseSideWhitespace ViewStructureBranchBoxes ViewStructureBranchCentroids ViewStructureInflectionPoints ViewStructureObjectBoxes ViewStructureObjectCentroids ViewStructureSegmentPoints ViewStructureTieLines ViewStructureTiePoints ViewToolProperties ViewVariables ViewVariablesShowCommonProperties ViewVariablesShowType ViewViewBots ViewViewBotsAdd ViewViewBotsDelete ViewViewBotsMoveDown ViewViewBotsMoveToBottom ViewViewBotsMoveToTop ViewViewBotsMoveUp ViewViewBotsRefresh ViewViewBotsRefreshAll ViewViewBotsSelectAdd ViewViewBotsSelectIntersect ViewViewBotsSelectInvert ViewViewBotsSelectReplace ViewViewBotsSelectSubtract ViewViewBotsSequence ViewViewBotsSequenceArgument ViewViewBotsSequenceColumn ViewViewBotsSequenceOperation ViewViewBotsSequenceScope ViewViewBotsSequenceScopeSize ViewViewBotsSequenceTime ViewViewBotsSequenceValue ViewViews ViewViewsAdd ViewViewsApply ViewViewsDelete ViewWatches ViewWatchesAdd ViewWatchesDelete ViewWatchesShowCommonProperties ViewWatchesShowType ViewWorld ViewWorldShowPosition ViewWorldTrackPosition ViewZoom ViewZoomIn
369. tion MessageBoxTypeSystemModal 1 Ckokck ck ck KKK KKK KK KKK Ck Ck KKK KKK KKK KKK KKK Ck Ck KKK KKK KK KKK Ck Ck KKK KKK KKK KK KKK KKK Mk ko ko ko ko Private Function Component Exists ByVal ComponentName Lorne Ketch Permission to use modify and distribute this code is granted provided that you cite the original author Dim Component Index Author Dim Comps Set Comps Document ComponentSet Component Ind Component Else End If Component ex Comps ItemByName ComponentName If Component Index lt 0 Then Exists Exists False True 248 End Function 1 kk ck KKK KKK KKK KKK Ck Ck Ck ck KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK Sk Sk ko Mk Sk Mk kx Sk ko ko ko kokockok Close a Window Private Sub Close Window ByVal Comp Name Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca Dim Index LastIndex WinSet Set WinSet Application WindowSet LastIndex WinSet Count 1 For Index 0 to LastIndex If uCase Comp Name uCase WinSet Index Component Name Then WinSet Index Close Exit Sub End If Next End Sub VK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK kv kx ko ko kock ko kock ok Retrieve all Component Names Sub Main Dim Comps Comp Dim Comment ComponentNames Dim ComponentNames Dim Counter Author Lorne Ketch Email Ketch at Jhfx dot eastlink ca
370. tive component is not a drawing Exit Sub End If Set ObjSelection Component Selection fail if there s no selected objects If ObjSelection Count 1 Then Application MessageBox No selected objects Exit Sub End If ask for output filename FileName InputBox File name Input Set FSO CreateObject Scripting FileSystemObject create file Set Stream FSO CreateTextFile FileName True write all selected objects For i 0 to ObjSelection Count 1 Set ObjPointSet ObjSelection i Geom BranchSet 0 PointSet write object type number of points Ser in If ObjSelection Item i Type ObjectPoint Then S Oy ElseIf ObjSelection Item i Type ObjectLine Then Str 2 Else jx emm End If Stream WriteLine Str amp amp ObjPointSet Count write first object branch For k 0 to ObjPointSet Count 1 Str ObjPointSet k X amp amp ObjPointSet k Y Stream WriteLine Str Next write blank line after each object Stream WriteLine Next close file Stream Close End Sub Export Text File Exports selected objects in opened drawing to a text file that supports branched objects 49 Sub Main Set Windows Application WindowSet fail if there is no opened windows If Windows Count 0 Then Application MessageBox No active window Exit Sub End If Set Window Windows ActiveWindow Set Component Window Component fail if a
371. tp forum manifold net Site Thread aspx id 498 amp ti 632544163200000000 This script processes DEM tiles downloaded from GeoBase http www geobase ca geobase en index html Site Map http www geobase ca geobase en sitemap html jsessionid C7BFB068C87A9127E967BBG6EDD989 9DC The data is extracted from the National Topgraphic Database NTDB files set 1 50k tiles are being processed here Manifold imports the DEMs fairly accurately There are two minor errors that have to be corrected by modifying settings in Edit Assign Projection 1 Manifold sees the DATUM as North American 1927 Mean for Conus when it r should be North American 1983 Canada I think 253 2 The localOffsetY setting is imported 0 75 arc seconds too low NOTE You must first select the start tile Manifold uses a localOffsetX and localOffsetY to set the lower left corner of the window It might be best to choose that tile as the start tile Lorne Ketch LKetch hfx eastlink ca March 14 2006 Update Oct 29 2006 Some V7 methods and properties introduced Option Explicit DKK ck ck ck kk Ck Ck kk Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck Ck kk Ck ck Ck Ck kk Ck ck kk Ck kk ko Sk Sk Sk Sk Mk kv ko ko ko ko ko ko Sub Main Dim Comps Comp Dim Surfaces Dim NumberOfSurfaces Dim Primary Surface Set Comps Document ComponentSet You must set the tile c
372. tr 0 Get Last Token Trim Right Str Len Str Ptr Change to Proper case No function for this in vbScript Get Last Token lCase Get Last Token Get Last Token uCase Left Get Last Token 1 amp Right Get Last Token Len Get Last Token 1 258 End Function VK KKK KK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK kv kx ko ko kock ko kocko BubbleSort Text based on Upper Case text evaluation Private Sub BubbleSort uCaseText ByRef Arr ByRef Descending BubbleSort Sort Arrays Using The Bubblesort Algorithm Date 9 4 1999 Author The VB2TheMax Team BubbleSort is especially convenient with small arrays 1 000 items or fewer or with arrays that are already almost sorted Converted to VBscript by L Ketch some modifications as well Dim Value Index First Item Index Limit LastSwap account for optional arguments First Item LBound arr LastSwap UBound arr Do Index Limit LastSwap 1 LastSwap 0 For Index First Item To Index Limit Value Arr Index If uCase Value gt uCase Arr Index 1 Xor Descending Then If the items are not in order swap them Arr Index Arr Index 1 Arr Index 1 Value LastSwap Index End If Next Loop While LastSwap End Sub VK KKK ck ck ck C Ck Sk Ck Ck Ck Ck Ck Ck Ck Ck ck Ck ck ck ck Sk ck ck Ck ck ck ck ck ck kk ck kk ck kk kk ck kk ck kk ck kk ck Sk Sk ck Sk Sk Mk kx k ko
373. ue IDs and put them into both the KeyService and Key columns You might want to set the computation mode of the KeyService column to on user request add several new records which will have a default value of 0 in the Key column then right click the KeyService column and invoke Recompute This will compute the IDs for the newly added records and save them in both Key and KeyService columns The code above will work fine for small tables but will probably be too slow for large amounts of new records Having said that it is easy to modify the code so that it either looks up the unused ID in a comment component or in Table Description One could also modify the code so that the IDs are generated by the COM object Given the size of the DLL containing the COM object is not overly large this could actually be faster than any other method adamw on 11 22 2003 1 08 PM 147 Since it is a key we don t need them sequential and we really don t want them to be re used One more idea if keys are only necessary for maintaining identity why not use GUIDs This will automatically ensure the uniqueness within the component within the MAP file and within all other MAP files for that matter I don t believe the natural language type of query builder is what would be desirable but rather one like that provided by Access and VS Net Point taken dmbrubac on 11 22 2003 1 58 PM 151 GUIDs are good Can you create them natively with manif
374. umber is amp VbCrLf amp not in the correct range amp VbCrLf amp VbCrLf amp _ 1 Regular Columns Only amp VbCrLf amp 2 ID Regular Columns amp VbCrLf amp _ 3 ALL ID Regular Columns Intrinsics amp VbCrLf amp _ 309 4 Intrinsics Only amp VbCrLf amp _ ob ID Only Choose Columns Error _ MessageBoxTypeOK OR MessageBoxTypelconError OR MessageBoxTypeSystemModal GI Collect Column Names FALSI Exit Function End If If Tbl Type ComponentTable Then Application MessageboxEX _ You must supply a Table Component Object to function amp VbCrLf amp Collect Column Names Not a Table _ MessageBoxTypeOK OR MessageBoxTypelconError OR MessageBoxTypeSystemModal Collect Column Names FALSI Exit Function End If Bj Set Cols Tbl ColumnSet ReDim Column List 100 Last Array Index 100 Last Index Cols Count 1 Column Index 1 For Index 0 to Last Index If Index Last Array Index Then ReDim Preserve Column List Last Array Index 100 Last Array Index uBound Column List End If Select Case Column Class Case 1 Regular Columns Only If NOT Cols Index IsIntrinsic and NOT Cols Index Identity Then Column Index Column Index 1 Column List Column Index Cols Index Name End If Case 2 ID Regular Columns If NOT Cols Index IsIntrinsic Then Column Index Column Index 1 Column List Column I
375. ument Changed AddHandler ev DocumentOpened AddressOf Document Changed AddHandler ev DocumentSaved AddressOf Document Changed End Sub 79 Private Sub Document Changed _ ByVal sender As System Object ByVal args As Manifold Interop Scripts DocumentEventArgs app args Document Application Labell Text args Document Path End Sub End Class 7 Invoke Project Show All Files In the Solution Explorer window expand MyPane then MyProject and finally double click AssemblyInfo vb Locate the line which sets the value of the ComVisible attribute to False and change it to set the value of the attribute to True lt Assembly ComVisible True gt 8 Build the class library by using Build Build MyPane Make sure there are no build errors 9 Save the code and the compiled binary by using File Save All 10 Launch Windows Explorer and locate the folder you saved the project to Descend into bin release copy MyPane dll and paste it into the Manifold configuration folder usually C Program Files Manifold System Config If you do not have write permissions in the configuration folder launch Manifold and change the file location for that folder to point to where you have write permissions 11 In Windows Explorer create a new XML file in the configuration folder and name it MyPane xml for convenience this file is different from MyPane xml generated by Visual Basic Drag and drop the created MyPane xml into
376. unction use great circle distances No We have a wishlist item to allow computing the length or area of a geom over the ellipsoid in a projection neutral way which seems to be similar to what is being done by MapInfo This might appear in a future update Adam Wachowski Anne http www georeference org Forums tabid 7 1 forumid l tpage 1 view topic postid 12284 Defaul t aspx 12472 09 05 2005 5 33 PM Hello All I am putting together a polygon layer of covenanted land areas in New Zealand Our database system records the area in Hectares that the land surveyor calculated when each covenant was 65 surveyed I am comparing this reported area to the area of the digital polygons as calculated in Manifold There are over 2000 covenants which range from lt 1 ha up to 6500 ha but the median size is 6 4 ha I have two concerns 1 The intrinsic Area T calculation is consistently above the reported area for each covenant AND when compared to area calculated in ArcGIS is consistently above that as well Out of 1715 covenants the Manifold Area calculation is greater than the Arc calculation of the same polygons by an average of 7 6 of the expected area with a std dev of 0 2 so it is pretty consistent 2 The intrinsic Area I field should report area in METRES squared but actually reports it in DECIMETRES squared ie I have to divide by 100 000 instead of 10 000 in order to convert to hectares I am using Manifold 6 5 and
377. urface Exit Sub End If Set surface window Component Set pixels surface PixelSet Set coordSystem surface CoordinateSystem Set coordParameters coordSystem Parameters scaleX coordParameters coordParameters ItemByName localScaleX Value scaleY coordParameters coordParameters ItemByName localScaleY Value slopeMax 25 width surface Width app StatusText Selecting pixels turn batch updates on app ActiveDocument BatchUpdates True select pixels For i 0 To pixels Count 1 If 1 Mod 100 99 Then app StatusText Selecting pixels amp CStr i 1 amp of amp CStr pixels Count 1 amp End If the following code assumes that Z value is measured in the same unit as X and pixelX i Mod width pixelY i width Set pixel pixels i If pixel IsMissing Then pixel Mask pixel Mask And Not 1 Else zE pixel Value compute height in eight neighboring pixels ZA PixelZ surface pixels pixelX 1 pixelY 1 zE zB PixelZ surface pixels pixelX pixelY 1 zE zC PixelZ surface pixels pixelX 1 pixelY 1 zE zD PixelZ surface pixels pixelX 1 pixelY zE zF PixelZ surface pixels pixelX 1 pixelY zE zG PixelZ surface pixels pixelX 1 pixelY 1 zE ZH PixelZ surface pixels pixelX pixelY 1 zE zI PixelZ surface pixels pixelX 1 pixelY 1 zE compute deltas in X and Y directions del
378. us Cos angle point Y location Y radius Sin angle pointSet Add point Next objects Add Application NewGeom GeomArea pointSet Next End Sub 29 Transefer County Name to Each City Equips each city with name of the country it is in Sub Main Set components document ComponentSet locate city drawing drawingIndex components ItemByName Cities If drawingIndex 0 Then Application MessageBox No Cities component Exit Sub End If Set cityDrawing components drawingIndex locate country drawing drawingIndex components ItemByName Countries If drawingIndex 0 Then Application MessageBox No Countries component Exit Sub End If Set countryDrawing components drawingIndex ensure both components are drawings If cityDrawing Type ComponentDrawing Then Application MessageBox Cities is not a drawing Exit Sub End If If countryDrawing Type ComponentDrawing Then Application MessageBox Countries is not a drawing Exit Sub End If obtain set of cities and set of countries Set cities cityDrawing ObjectSet Set countries countryDrawing ObjectSet ensure both object sets are not empty If cities Count 0 Then Application MessageBox No objects in Cities Exit Sub End If If countries Count 0 Then Application MessageBox No objects in Countries Exit Sub End If obtain owned tables and set of table records
379. using BubbleSort TRUE or FALSE Descending sort Descending TRUE or Ascending FALSE NOTE The ID Identity column many not always be labelled as ID and Intrinsics might not end in I Adam explains this in the GeoReference thread below adamw at 4 10 2006 7 07 AM 20352 http 69 17 46 171 Site Thread aspx id 20092 amp ti 632803720515300000 You might want to modify the condition in the line filtering the intrinsic columns and the ID column to If Not clmn IsIntrinsic And Not clmn Identity Then This will make the code more robust Under certain circumstances the name of the ID column might differ from ID and the names of the intrinsic columns might not end with I Dim Index Last Index Last Array Index Dim Cols Column Index Mode Error Collect Column Names TRUE Mode Error FALSE If Column Class is not numeric and we attempt to do an operation like Column Class 1 an error will be generated If NOT IsNumeric Column Class Then Mode Error TRUE Elself Column Class 1 Or Column Class 5 Then Mode Error TRUE End If If Mode Error Then Application MessageboxEX The first parametre passed to function Collect Column Names must amp VbCrLf amp _ be a number between 1 and 5 That number specifies which column amp VbCrLf amp _ names to collect You did not pass a number or the n
380. ut is very useful The FGDC encoding 157 of the projection information is too complex to generate for fun Several portions of the script are commented out and expect you to indicate what you want For example in Man there is an If statement that allows you to select to produce a report for Dim manDoc Const LatLongDigits 4 Sub Main Dim window windows Dim manComponents Dim manComp Dim Index s set manDoc Application ActiveDocument If True report on all components If False then Dim dtStart dtStart Now Set manComponents manDoc ComponentSet For Index 0 To manComponents Count 1 Set manComp manComponents Index Application StatusText manComp TypeName amp amp amp Indext l amp of amp manComponents Count Application Messagebox manComp TypeName amp S MetadataMandatoryRpt manComp Next Application Messagebox Done with batch amp DateDiff s dtStart Now amp seconds Else report on active component set windows Application WindowSet fail if there is no opened windows If windows Count 0 Then Application Messagebox No active component Exit Sub End If set window windows ActiveWindow set manComp window Component Application StatusText manComp TypeName amp S MetadataMandatoryRpt manComp Application Messagebox Created Report amp s End If Application StatusText End Sub all components
381. w ActiveComponent Ensure input drawing is projected within proper coordinate system If dwg CoordinateSystem Name lt gt Transverse Mercator or _ dwg CoordinateSystem Datum Name lt gt _ North American 1983 mean for CONUS Then doc BatchUpdates true Init the new coordinate system dim coordSysNew Set CoordSysNew Application NewCoordinateSystem Transverse Mercator CoordSysNew Datum Application NewDatum North American 1983 mean for CONUS coordSysNew Unit Application NewUnit Meter coordSysNew Parameters centerLat Value 37 0 rough coordSysNew Parameters centerLon Value 95 0 rough Fire up a coordinate converter and convert the input drawing to the proper coordinate system dim cc Set cc Application NewCoordinateConverter cc Prepare dwg CoordinateSystem coordSysNew dim startTime startTime Now If cc ConvertsData Then 116 Application StatusText Converting to projection amp coordSysNew Name amp Please wait Dim objIdx obj for objIdx 0 to dwg ObjectSet Count 1 set obj dwg ObjectSet objIdx Application StatusText Converting drawing to projection amp coordSysNew Name amp Projecting object amp objIdx amp of amp dwg ObjectSet Count cc Convert obj Geom next End If Application MessageBox Projection time amp DateDiff s startTime Now amp seconds Reprojection Statistics Attach the new coord
382. w component when it is created because you can not rely on the newly added labels component to be the last one in the component set DO THIS Set Labels E Document NewLabels Temp Str amp Labels E Points TRUE NOT THIS Document NewLabels Temp Str amp Labels E Points TRUE Set Labels E Comps Item Comps Count 1 Adding a DLL Reference to a VBScript http 69 17 46 171 Site Thread aspx id 20106 amp ti 632798794218230000 TimOsborn at 4 3 2006 6 22 PM 20107 I understood I could invoke a form that was coded in a NET DLL This works fine in VB NET for example Dim S As New PI frmPiScoreboard S Visible True But the same thing ina VB NET script in Manifold raises Exception has been thrown by the Target of an Invocation Can anyone help 225 Thanks Tim Fixed it so I m going to reply to my own post The DLL has to be in Program Files Manifold System Anywhere else and it compiles but won t run How whacky is that I can t find any reference to this in the documentation Tim Does it not work when you add the reference using Script References Browse to the DLL and add it to the list d Hi Henry No that s the point I d certainly added the reference to the DLL but it only works if the DLL is in Manifold System It wouldn t compile if the reference was missing Tim Implementing Dissolve http 69 17 46 171 Site Thread a
383. xNew CDbl record Data X I yNew CDbl record Data Y I protect from invalid weights If weightNew lt 0 Then weightNew 1 End If If countyNew lt gt county Or recordIndex If weight gt 0 Then create centroid records Count 1 Then Set pointSet Application NewPointSet Set point Application NewPoint point X x weight point Y y weight pointSet Add point Set geom Application NewGeom GeomPoint pointSet Set objectSet drawing ObjectSet append centroid to drawing objectSet Add geom amp of 15 amp Els select newly created centroid objectSet LastAdded Mask 1 End If county countyNew weight weightNew x xNew weightNew y yNew weightNew e weight weight weightNew x x xNew weightNew y y yNew weightNew End If Next Application StatusText Done End Sub Coordinate Systems reports the number of objects and coordinate system of each drawing into the new Comments component Report Reports number of objects and coordinate system of each drawing into the new Comments component Sub Main Set Components Document ComponentSet create report component or reuse existing one ReportIndex Components ItemByName Drawing Report Text If ReportIndex 0 Then Set Report Document NewComments Drawing Report Text Else Set Report Components ReportIndex
384. xTypeSystemModal Drwg Open Exit Sub End If Set Objs Drwg Selection Selected Objects Selected Objects Elself Mode 2 Then Drwg SelectNone Where Clause 293 Select Case Mode Case 3 Where Clause Where Type I 1 Selected Objects Point Objects Case 4 Where Clause Where Type I 2 Selected Objects Line Objects Case 5 Where Clause Where Type I 3 Selected Objects Area Objects Case 6 Where Clause Where Type I 1 OR Type I 2 Selected Objects Point and Line Objects Case 7 Where Clause Wher Typ I 1 OR Type 1 3 Selected Objects Point and Area Objects Case 8 Where Clause Where Type I 2 OR Type I 3 Selected Objects Line and Area Objects End Select Qry Text Upda From Set Ory RunEX TRUE End If te Select Selection I as Selection amp amp Drwg Name amp amp Where Clause amp Selection TRU en Gl Set Objs Drwg Selection Get Coord WholeNumber MaxStrLength Drwg MaxX WholeNumber MaxY WholeNumber If uCase Selected Objects OBJECTS Then Header USER REQUESTED ALL amp uCase Selected Objects Else Header USER REQUESTED amp uCase Selected Objects End IF If Objs Count gt 0 Then Comment l Clear Comment 1 AddTex
385. xel Y amp amp pixel Value End If Next stream Close End Sub Generic Exporter http www georeference org Forums tabid 7 1 forumid 7 tpage 1 view topic postid 1063 Default aspx 1063 WiHH 02 01 2004 7 28 PM The script below is a generic exporter It should cover basic batch exporting needs It allows the user to export any component type to any file format supported by Manifold One feature I would like to add is a prompt once feature where the settings from the first prompt would be applied to all subsequent exports in the batch VOR KKK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Generic Batch Exporter William Howell November 2003 For Manifold version 5 50 SP2 Permission to use modify and distribute this code is hereby granted providing this entire comment section is included No warranty is expressed or implied Exports all components of given type i e Drawing from specified folder within Manifold to folder location in given format i e DXF Values are passed to script by a comma delimted string without spaces see example below entered in an input box It can create one subfolder in the based on the export path given export path Manifold folder component type export format 2 4 letters export prompt c temp newExportFolder myFolder Drawing DXF no The above would export to c temp newExportFolder note the ending slash
386. y active column and alter its Function property as well as the contents of the relevant script component Create Active Column script component must be previously attached to the table Date Fri 02 17 2006 2 17 AM To Manifold List Subject Re Manifold I Can Active Column Creation Be Scripted http lists directionsmag com discussion read php f 29 amp i 4 1596 amp t 41572 gt Does anyone know if active column creation can be done via script If gt so can the script for the column s also be created this way Yes Sub Main Set tbl Application ActiveDocument ComponentSet Drawing Table Set scr Application ActiveDocument ComponentSet Drawing Table Script add new function colScript Function MyFunc MyFunc CInt Record Data ID 1 _ End Function Scr Text scr Text Replace colScript Chr 13 Chr 10 add new column Set col tbl ColumnSet NewColumn col Name NewColumn col Type ColumnTypeInt32U col Function MyFunc col ComputationMode ComputationModeManual tbl ColumnSet Add col End Sub You have to have a script component attached to the table already The easiest way to achieve this is to create a new active column and then delete it and optionally remove all code from the script component I think you can not yet do this programmatically Adam Wachowski Calculating Spherical Distances and Areas L Ketch This is a two part topic 1 anote I sent
387. y problems with a specific entry L Ketch Feb 2 2007 LKetchlat hfx 1st_dot eastlink 2nd_dot ca Table of Contents TABLE OF CONTENTS csssssssssscsssssesssssnecsssessscsssssssnsssesssscssscsscssscssccsssessssssesesssesssseesscsscssaesscsssnsssnsesessonssesees I V7X OBJECT MODEL GRAPHIC ccc cssectsocessccsssseesosdeoncseseseossasscouesess cons sess cos tvessesbesessecsecscnestasesoorescesnessassocrsasseeses 1 PROGRAMMING BASICS 2 THE VERY BASICS ocurre tutu idee lee tud urtica nis quu bote vr aset art letemive drei aee de es 2 TERMINOLOGY AND CODING CONVENTIONS SIMPLE SCRIPT c ceccesscesecssecssccsseseeecaeeeaeeeeeseeeeeeeeeeeseeesaeensesaeeaeenaes 2 REFERENCING THE ACTIVE COMPONENT WINDOW VIA SCRIPTS secceesceceseeeeseeceueeeescecsueeeeeeecaeeseaeecaeeeeaeeceaeeeeneeees 3 SAMPLE CODE PROVIDED BY MANIFOLD ON THEIR FREE STUFF PAGE cernerent 5 AZIMUTH LINES CREATES LINES USING AZIMUTH amp DISTANCE PAIRS STORED IN TABLE eere 5 BSPLINE2 SMOOTHS SELECTED LINES ccsceuessncveesconesessoncveonsontenevecbevecascntvenncesensed sandy ea E eR Ee ER MEN ENEEK EREEREER 6 BSPLINE JOIN SELECTED POINTS WITH SPLINE eeeeeeeeeeee eene nnne nennen nennen ne ennt nhe nnetest nete re ennt trennen ennt 9 Closed HII T HE Xx 9 Open I T TELE 1l CENTROIDS TRAVERSES CITIES DRAWING ADDING CENTROID OF A SET OF CITIES FOR EACH COUNTY
388. ying to call the EventArgs object in a script other than OnClick When the script is run the message Object required EventArgs appears How do I access the EventArgs object If EventArgs HasObject Then varX EventArgs LocationNative X varY EventArgs LocationNative Y End If You can not What are you trying to do I need to have a user select a location in a map window and also have a user select an object or objects in a specific sequence from within the script Basically I need the information that the EventArgs provides from a mouse click Why then are you not using the OnClick script Because this is part of a complex process that can t be running every time a mouse is clicked Unless the OnClick can pass values or reference to another script Here is some partial code that lets you get at the selected objects in a drawing note that you are actually looking for a table You can easily filter what you do and do not want to process This is VB NET code to clearly demonstrate a concept not necessarily a best practices way of doing things 84 Private Sub ConnectEvents ByVal ev As Manifold Interop Scripts Events Implements Manifold Interop Scripts IEventsConnection ConnectEvents AddHandler ev ComponentSelectionChanged AddressOf Component SelectionChanged End Sub Private Sub Component SelectionChanged ByVal sender As System Object _ ByVal args As Manifold Interop Scripts ComponentEventAr
389. ype ColumnTypeWChar OR Col Type ColumnTypeWText Then Add Quotes TRUE For Each Rcrd in Rcrds If Add Quotes Then W Len cStr Rcrd Data Column Names Col Index 3 Else Len cStr Rcrd Data Column Names Col Index 1 End If If W Column Width Then Column Width W Next Column Widths Col Index Column Width Next Else Fixed Width False End If Insert the column names into the first line if requested If Include ColumnNames Then For Col Index 0 to Last Col Index If Quotes Then Str amp Column Names Col Index amp Else Str Column Names Col Index End If If Fixed Width Then Padding String Column Widths Col Index Len Str 32 Padding Space Column Widths Col Index Len Str Str Str amp Padding Report Comp AddText Str Else If Col Index Last Col Index Then Report Comp AddText Str Else Report Comp AddText Str amp Separator End If End If Next 233 Report Comp AddText VbCrLf End If Record Count Rcrds Count Final Loop Add the formatted data for each record For Each Rcrd in Rcrds Report For Col Index 0 to Last Col Index Set Col Cols Col Index Add Quotes FALSE If Quotes AND Col Type ColumnTypeAChar OR Col Type ColumnTypeAText OR Col Type ColumnTypeWChar OR Col Type ColumnTypeWText Then Add Quotes TRUE If Add Quotes Then Str amp cStr Rcrd Data Column
Download Pdf Manuals
Related Search
Related Contents
Montage - Tone King Sony Mavica MVC-FD200 User's Manual IDS DT220 Desktop Terminal Manual DALI x/e-touchPANEL 02 MTW-3 Bedienungsanleitung IPAdminTool User`s Manual Copyright © All rights reserved.
Failed to retrieve file