קבלת הפניות לקבצים חיצוניים
Contents
[
Hide
]איך לקבל הפניות לקבצים חיצוניים
בעיה: איך לקבל הפניות לקבצים חיצוניים (CADNET-110).
טיפים: כדי לקבל הפreferences לקבצים חיצוניים עבור ציורים בחסימת הישות יש שדה XRef PathName עבור תמונות רסטר CadRasterImage Def משמש עבור שכבת חוץ CadDgnUnderlay משמש והשדה UnderlayPath שלה.
דוגמה:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
External drawing: | |
foreach (CadBaseEntity baseEntity in image.Entities) | |
{ | |
// if entity is a block | |
if (baseEntity.TypeName == CadEntityTypeName.INSERT) | |
{ | |
CadInsertObject insert = (CadInsertObject)baseEntity; | |
CadBlockEntity block = image.BlockEntities[insert.Name]; | |
// get external reference to object | |
System.Console.WriteLine(block.XRefPathName); | |
} | |
} | |
External raster image: | |
foreach (CadBaseObject baseObject in image.Objects) | |
{ | |
// if entity is an image definition | |
if (baseObject.TypeName == CadObjectTypeName.IMAGEDEF) | |
{ | |
CadRasterImageDef rasterImageDef = (CadRasterImageDef)baseObject; | |
// get external reference to object | |
System.Console.WriteLine(rasterImageDef.FileName); | |
} | |
} | |
External underlay: | |
foreach (CadBaseEntity baseEntity in cadImage.Entities) | |
{ | |
if (baseEntity.TypeName == CadEntityTypeName.DGNUNDERLAY) // or DWFUNDERLAY, or PDFUNDERLAY | |
{ | |
CadDgnUnderlay dgnFile = (CadDgnUnderlay)baseEntity; // or CadDwfUnderlay, or CadPdfUnderlay | |
System.Console.WriteLine(dgnFile.UnderlayPath); | |
} | |
} |