I imported the DWG file into the eyeshot model. For reading file I used ReadAutodesk class. I want to apply Scaleup and Scaledown on the imported DWG file. I don’t understand how to do that. Can you please help me.
This is code I used.
private void RibbonRadioButton_Click(object sender, RoutedEventArgs e) {
OpenFileDialog openFileDialog1 = new OpenFileDialog() {
Filter = "DWG File|*.dwg|pdf file|*.pdf",
Multiselect = false,
AddExtension = true,
CheckFileExists = true,
CheckPathExists = true
};
string fileName = null;
if (fileName != null || openFileDialog1.ShowDialog().Value) {
System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(delegate { }));
var rfa = new ReadAutodesk(fileName != null ? fileName : openFileDialog1.FileName);
ScaleTransform aa = new ScaleTransform(2,2.5,1,1);
rfa.DoWork();
rfa.AddToScene(model1);
Entity[] toAdd = model1.Entities.Explode();
model1.RenderTransform = aa;
model1.ZoomFit();
model1.Entities.AddRange(toAdd, NOT_MODIFIED_COLOR);
model1.SetView(viewType.Top);
// Fits the model in the viewport
model1.Invalidate();
}
}