- UID
- 658062
- 积分
- 2147
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2008-10-22
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 csharp 于 2014-10-5 19:58 编辑
Slm is a utility which helps you to create, edit, and manage AutoCAD slide libraries. It can read any version of AutoCAD slides, or slide libraries. It can also read any slide format (platform dependent such as UNIX, MAC, INTEL), and convert them into PNG transparent images.
Download the installer herehttps://github.com/ADN-DevTech/A ... anager.msi?raw=true
The WPF Slide Control
The ‘Slide' control is a WPF control which displays slides under Windows platforms. It can be used by any other WPF application. It exposes three objects which are:
SlideObject - which gives you access to 'slides'. I.e. SLD
SlideLibObject - which gives you access to Slide Libraries. I.e. SLB
SlideCtrl - the control itself
Install using NuGet:
Create a Wpf Application
Project -> Manage NuGet Packages...
Search and Install 'AutoCAD Slide Control' package
or if the package does not show use the console
Create a Wpf Application
Tools -> NuGet Package Manager -> Package Manager Console
On the console, enter: Install-Package AutoCAD.Slide.Control
SlideObject
This class gives you access to 'slide' object.
Add the following line to your code
using Autodesk.AutoCAD.Windows;
You can now use the SlideObject class.
Example
using Autodesk.AutoCAD.Windows;
SlideObject sld = new SlideObject(@"MySlide.sld");
BitmapImage renderBitmap = sld.Export();
PngBitmapEncoder encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(renderBitmap)); // Push the rendered bitmap to it
using (FileStream outStream = new FileStream(@"MySlide.png", FileMode.Create)) // Create a file stream for saving image
{
encoder.Save(outStream);
}
SlideLibObject
This class gives you access to 'slide library' object.
Add the following line to your code
using Autodesk.AutoCAD.Windows;
You can now use the SlideLibObject class.
Example
using Autodesk.AutoCAD.Windows;
SlideLibObject slb = new SlideLibObject(@"acad.slb");
SlideObject sld = slb._Slides["ZIGZAG"];
sld.SaveAs("ZIGZAG.sld");
is equivalent to
using Autodesk.AutoCAD.Windows;
SlideObject sld = SlideLibObject.LoadSlideFromLibrary(@"acad.slb", "ZIGZAG");
sld.SaveAs("ZIGZAG.sld");
SlideCtrl
This control allows you to display AutoCAD Slides in a WPF application.
Add the following line to your WPF Window xaml
xmlns:SlideCtrlNS="clr-namespace:Autodesk.AutoCAD.Windows;assembly=SlideCtrl"
Insert the control in you window like this
<SlideCtrlNS:SlideCtrl x:Name="preview" />
Example
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
xmlns:SlideCtrlNS="clr-namespace:Autodesk.AutoCAD.Windows;assembly=SlideCtrl"
>
<Grid>
<SlideCtrlNS:SlideCtrl x:Name="preview" SlideFileName="MySlide.sld" />
</Grid>
</Window>
using Autodesk.AutoCAD.Windows;
SlideObject sld = new SlideObject(@"MySlide.sld");
preview.Slide = sld;
or
using Autodesk.AutoCAD.Windows;
preview.SlideFileName = @"MySlide.sld";
License
Autodesk Slide Control / Slide Library Manager Application are licensed under the terms of the MIT License. Please see the LICENSE file for full details.
Written by
Cyrille Fauvel
Autodesk Developer Network
Autodesk Inc.
http://www.autodesk.com/adn
|
|