Insert block

Insert block

HectorJZL6Z
Community Visitor Community Visitor
359 Views
1 Reply
Message 1 of 2

Insert block

HectorJZL6Z
Community Visitor
Community Visitor

Hi

 

I am using this code to insert blocks; however, it does not work all the time. Sometimes it skip the next and the blocks are inserted on top of each others

 

string newFileName = "";
string destinationFile = $"{filePath}Temporal\\";
acadApp.Preferences.Files.SupportPath += $";{destinationFile}";
#region Crear Copias del IOTable
position = positionPoint.Value.Y;
foreach (var item in response.CubeFlexIntegration.DATA)
{
newFileName = $"IOTable{item.Detail_Id}.dwg";
position = position - 0.3;
CreateCopyFileIOTable(filePath, destinationFile, newFileName);

_editor.Command("_insert", $"{newFileName}", $"{positionPoint.Value.X},{position},{positionPoint.Value.Z}",
$"1", $"1", $"0");

EditBlockAtt($"IOTable{item.Detail_Id}", "IO", item.Oj);
EditBlockAtt($"IOTable{item.Detail_Id}", "BAC_ID", item.BAC_ID);
EditBlockAtt($"IOTable{item.Detail_Id}", "REF", item.Reff);
EditBlockAtt($"IOTable{item.Detail_Id}", "DEVICE", item.Device);
EditBlockAtt($"IOTable{item.Detail_Id}", "IN_USE_BY", item.In_Use_By);
}

 

0 Likes
360 Views
1 Reply
Reply (1)
Message 2 of 2

paullimapa
Mentor
Mentor
0 Likes