We displayed a point cloud on the model space of the AutoCAD by executing either "POINTCLOUDATTACH" or "-POINTCLOUDATTACH,"
each of which was passed to the function "SendStringToExecute" in C# program.
When we measured the distance between any two points on the model space,
the distance in the case of "-POINTCLOUDATTACH" is three orders of magnitude greater than the one in the case of "POINTCLOUDATTACH."
Our code when using "-POINTCLOUDATTACH" is as follows:
private static void AttachPcgFile(string pcgFilePath, Point3d basePoint) { var replacePcgFilePath = pcgFilePath.Replace('\\', '/'); var doc = Application.DocumentManager.MdiActiveDocument; var command = string.Format( "_.-VISUALSTYLES _C _W _.UCSICON _ON _.GRID _OF (command \"_.-POINTCLOUDATTACH\" \"{0}\" \"{1},{2},{3}\" \"1\" \"0\")(princ) ", replacePcgFilePath, basePoint.X, basePoint.Y, basePoint.Z ); doc.SendStringToExecute(command, false, false, false); }
We can not understand why two commands cause the different value when we measure the distance on the point cloud.
We want to know the correct command string by which we obtain the same distance.
If anyone has information concerning about it, please let us know.
Sincerely yours,
Seiya Kumada