개정판 da1aeb27
dev issue #507 : fix linenumber attribute
Change-Id: I14b0140e4043b2a631acfb25e976f87e27ddf7b7
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
150 | 150 |
finally |
151 | 151 |
{ |
152 | 152 |
Project_DB.InsertDrawingInfoAndOPCInfo(document.PATH, drawingNumber, drawingName, document); |
153 |
Project_DB.InsertLineNumberInfo(document.PATH, drawingNumber, drawingName, document); |
|
154 |
|
|
153 | 155 |
if (SplashScreenManager.Default != null && SplashScreenManager.Default.IsSplashFormVisible) |
154 | 156 |
{ |
155 | 157 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.ClearParent, null); |
... | ... | |
184 | 186 |
_placement = null; |
185 | 187 |
|
186 | 188 |
Thread.Sleep(1000); |
189 |
|
|
190 |
|
|
191 |
|
|
187 | 192 |
} |
188 | 193 |
} |
189 | 194 |
|
DTI_PID/SPPIDConverter/ConverterDocking.cs | ||
---|---|---|
1559 | 1559 |
|
1560 | 1560 |
private void simpleButton1_Click(object sender, EventArgs e) |
1561 | 1561 |
{ |
1562 |
SPPIDUtil.test(); |
|
1563 |
//Placement placement = new Placement(); |
|
1564 |
//LMADataSource dataSource = placement.PIDDataSource; |
|
1562 |
//SPPIDUtil.test(); |
|
1563 |
if (application.ActiveSelectSet.Count == 0) |
|
1564 |
return; |
|
1565 |
|
|
1566 |
foreach (DrawingObjectBase item in application.ActiveSelectSet) |
|
1567 |
{ |
|
1568 |
DependencyObject dependency = item as DependencyObject; |
|
1569 |
if (dependency != null) |
|
1570 |
{ |
|
1571 |
foreach (var attributes in dependency.AttributeSets) |
|
1572 |
{ |
|
1573 |
foreach (var attribute in attributes) |
|
1574 |
{ |
|
1575 |
string name = attribute.Name; |
|
1576 |
object value = attribute.GetValue(); |
|
1577 |
if (name == "ModelID") |
|
1578 |
{ |
|
1579 |
Placement placement = new Placement(); |
|
1580 |
LMADataSource dataSource = placement.PIDDataSource; |
|
1581 |
LMPipeRun pipeRun = dataSource.GetPipeRun(value); |
|
1582 |
string attrName = "PlantGroup.Name"; |
|
1583 |
LMAAttribute lMAAttribute = pipeRun.Attributes[attrName]; |
|
1584 |
if (lMAAttribute != null) |
|
1585 |
{ |
|
1586 |
lMAAttribute.set_Value("25"); |
|
1587 |
pipeRun.Commit(); |
|
1588 |
} |
|
1589 |
else |
|
1590 |
{ |
|
1591 |
|
|
1592 |
} |
|
1593 |
} |
|
1594 |
} |
|
1595 |
} |
|
1596 |
} |
|
1597 |
} |
|
1598 |
|
|
1599 |
|
|
1600 |
|
|
1565 | 1601 |
//string a = "0A509911F33441A2AF088BFBA78B770D"; |
1566 | 1602 |
//LMLabelPersist label = dataSource.GetLabelPersist(a); |
1567 | 1603 |
//label.set_XCoordinate(0.4); |
1568 |
|
|
1604 |
|
|
1569 | 1605 |
|
1570 | 1606 |
|
1571 | 1607 |
|
DTI_PID/SPPIDConverter/DB/Project_DB.cs | ||
---|---|---|
1947 | 1947 |
return true; |
1948 | 1948 |
} |
1949 | 1949 |
|
1950 |
public static bool InsertLineNumberInfo(string path, string drawingNumber, string drawingName, SPPID.Model.SPPID_Document document) |
|
1951 |
{ |
|
1952 |
bool result = false; |
|
1953 |
|
|
1954 |
return result; |
|
1955 |
} |
|
1950 | 1956 |
public static bool InsertOPCInfo(string UID, string ModelItemID, string drawingUID, bool Paired) |
1951 | 1957 |
{ |
1952 | 1958 |
Project_Info projectInfo = Project_Info.GetInstance(); |
내보내기 Unified diff