This commit is contained in:
ShrlAlgo
2025-07-11 09:20:23 +08:00
parent c7b104f44f
commit 4d35cadb56
840 changed files with 102347 additions and 11595 deletions

34
RevitLess/Program.cs Normal file
View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace RevitLess
{
internal class Program
{
private static void Main(string[] args)
{
SaveImage(@"F:\测试\项目.rvt");
}
private static void SaveImage(string filePath)
{
var fi= new FileInfo(filePath);
Storage storage = new Storage(fi.FullName);
Image b = storage.ThumbnailImage.GetPreviewAsImage();
MessageBox.Show(storage.BasicInfo.ToString());
//Bitmap bm = new Bitmap(b.Width, b.Height, PixelFormat.Format24bppRgb);
//Graphics g = Graphics.FromImage(bm);
//g.DrawImage(b, new Point(0, 0));
//g.Dispose();
//bm.Save(Path.Combine(fi.Directory.FullName, "_Images", fi.Name.Remove(fi.Name.Length - 4) + ".png"), System.Drawing.Imaging.ImageFormat.Png);
}
}
}