本文整理汇总了C#中System.ComponentModel.Model.GetProjectInfo方法的典型用法代码示例。如果您正苦于以下问题:C# Model.GetProjectInfo方法的具体用法?C# Model.GetProjectInfo怎么用?C# Model.GetProjectInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ComponentModel.Model
的用法示例。
在下文中一共展示了Model.GetProjectInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrintToFile
private bool PrintToFile(Drawing currentDrawing)
{
bool Result = false;
double scale = 1.0;
if (rbtnSCALE.Checked)
{
//get scale of the first view
//scale = GetScaleFromTheView();
}
DrawingHandler MyDrawingHandler = new DrawingHandler();
PrintAttributes printAttributes = new PrintAttributes();
printAttributes.Scale = scale;
printAttributes.PrintToMultipleSheet = false;
printAttributes.NumberOfCopies = 1;
printAttributes.Orientation = DotPrintOrientationType.Auto;
printAttributes.PrintArea = DotPrintAreaType.EntireDrawing;
printAttributes.PrinterInstance = "DWG";
string DrawingType = GetDrawingTypeCharacter(currentDrawing);
/*
set XS_DRAWING_PLOT_FILE_DIRECTORY=.\PlotFiles
set XS_DRAWING_PLOT_FILE_NAME_A=%%UDA:PROJECT_USERFIELD_1%%-%%NAME.-%%%%REV_MARK?_Rev%%%%REV_MARK%%
set XS_DRAWING_PLOT_FILE_NAME_W=%%UDA:PROJECT_USERFIELD_1%%-%%NAME.-%%%%REV_MARK?_Rev%%%%REV_MARK%%
set XS_DRAWING_PLOT_FILE_NAME_C=%%UDA:PROJECT_USERFIELD_1%%-%%NAME.-%%%%REV_MARK?_Rev%%%%REV_MARK%%
set XS_DRAWING_PLOT_FILE_NAME_G=%%UDA:PROJECT_USERFIELD_1%%-%%TITLE.-%%%%REV_MARK?_Rev%%%%REV_MARK%%
set XS_DRAWING_PLOT_FILE_NAME_M=%%UDA:PROJECT_USERFIELD_1%%-%%TITLE.-%%%%REV_MARK?_Rev%%%%REV_MARK%%
*/
//string output_path = Environment.GetEnvironmentVariable("XS_DRAWING_PLOT_FILE_DIRECTORY");
string output_path = "c:\\pdf";
string output_file = "out.dwg";
Model CurrentModel = new Model();
ProjectInfo ProjectInfo = CurrentModel.GetProjectInfo();
if (CurrentModel.GetConnectionStatus())
{
output_file = ProjectInfo.ProjectNumber;
}
string DrawingName = "";
//TSM.Operations.Operation.DisplayPrompt("DrawingType" + DrawingType);
switch (DrawingType)
{
case "A":
//output_file = Environment.GetEnvironmentVariable("XS_DRAWING_PLOT_FILE_NAME_A");
case "W":
//output_file = Environment.GetEnvironmentVariable("XS_DRAWING_PLOT_FILE_NAME_W");
case "C":
//output_file = Environment.GetEnvironmentVariable("XS_DRAWING_PLOT_FILE_NAME_C");
DrawingName = currentDrawing.Mark;
DrawingName = RemoveBrackets(DrawingName);
break;
case "G":
//output_file = Environment.GetEnvironmentVariable("XS_DRAWING_PLOT_FILE_NAME_G");
case "M":
//output_file = Environment.GetEnvironmentVariable("XS_DRAWING_PLOT_FILE_NAME_M");
DrawingName = currentDrawing.Name;
break;
default:
goto case "A";
}
DrawingName = DrawingName.Replace('.', '-');
output_file += "-" + DrawingName + ".dwg";
if (!String.IsNullOrEmpty(output_path) && !String.IsNullOrEmpty(output_file))
Result = MyDrawingHandler.PrintDrawing(currentDrawing, printAttributes, output_path + "\\" + output_file);
return Result;
}