thePrj = Prj.MakeNull ' Get the Project theProject = av.GetProject ' Get the View theView = av.GetActiveDoc ' Get the themes theThemes = theView.GetThemes ' Get the TIN themes theTinThemes = List.Make for each t in theThemes if (t.Is(STheme)) then theTinThemes.Add(t) end end ' Select the TIN theme theTinTheme = MsgBox.ListAsString(theTinThemes, "Select TIN Theme", "") if (theTinTheme = Nil) then MsgBox.Error("Must select TIN theme", "Error") Return Nil end theTinSrc = theTinTheme.GetSrcName theSurface = Surface.Make(theTinSRC) ' Make the temporary dbf for the surface cross section theFN = theProject.GetWorkDir.MakeTmp("sxc", "dbf") ' Get Line Themes theLThemes = List.Make for each t in theThemes if (t.Is(FTheme)) then theFSubInd = t.GetSrcName.GetSubName.Indexof("arc") if (theFSubInd = 0) then theLThemes.Add(t) end end end theLineTheme = MsgBox.ListAsString(theLThemes, "Select Line theme", "") if (theLineTheme = Nil) then MsgBox.Error("Must select line theme", "Error") Return Nil end theFTab = theLineTheme.GetFTab theFields = theFTab.GetFields theField = MsgBox.ListAsString(theFields, "Select the ID field from the Line table", "") theSampleDistance = 10 theSurface.ProfileAsTable (theFTab, theFN, theField, thePrj, theSampleDistance) if (File.Exists(theFN)) then MsgBox.Info(theFN.AsString++"has been created", "") end