Notifications
Clear all

Carlson CRD Files.... Why?

14 Posts
9 Users
0 Reactions
6 Views
(@andy-j)
Posts: 3121
Topic starter
 

As?ÿ a new user of Carlson, I wonder why the data is in a .CRD file??ÿ Is there something magical inside there??ÿ Or is it just the same as .CSV or .TXT file with PNEZD format??ÿ ?ÿ?ÿ

?ÿ

File size seems awfully bloated when compared to a simple ASCII export file.?ÿ?ÿ

?ÿ

Just wondering.?ÿ?ÿ

Andy?ÿ

 
Posted : 14/08/2018 1:59 pm
(@tru-grade)
Posts: 17
Active Member Registered
 

I don't why it is in that format but it is handy to correct the raw data in the field before it is downloaded.

 
Posted : 14/08/2018 3:42 pm
(@mvanhank222)
Posts: 374
Reputable Member Registered
 

I donƒ??t know why the file type but it is nice having points in a separate file that is constantly being saved for when it crashes.?ÿ

 
Posted : 14/08/2018 4:14 pm
(@stephen-ward)
Posts: 2246
Famed Member Registered
 

Their DC's use the same file so I believe there's more in there than coordinates.?ÿ

 
Posted : 14/08/2018 4:23 pm
(@tnygaard)
Posts: 21
Eminent Member Registered
 

Andy,

The Carlson CRD format is a binary (non ascii) format that is actually pretty efficient.?ÿ This file is sorted by point id and comes in two flavors - numeric point ids and alpha numeric point ids (up to 10 chars).?ÿ Carlson also has a newer *.crdb format that is actually a SQLite database. This newer version supports longer point ids and longer descriptors greater than 32 characters.?ÿ Are you looking at a *.crdb file??ÿ Now that file will be quite a bit bigger because of all the db overhead.?ÿ What I like about the .CRD format is its fast and easy to manipulate programmatically - except for sorting the file which is required if the file is consumed by Carlson Software.

Best regards,

Terry?ÿ

 
Posted : 14/08/2018 5:21 pm
(@dbarrow)
Posts: 4
New Member Registered
 

Terry, I know this is old, but can you elaborate on crd files being easy to manipulate programmatically??ÿ I am building some routines using ObjectArx sdk and would like to write Carlson points to the dwg document and to the crd file. Any tips?

Thanks

Darryl

 
Posted : 30/10/2021 3:15 am
(@tnygaard)
Posts: 21
Eminent Member Registered
 

Darryl,

Sorry I missed your question. I have attached a document that was provided to me some time ago on the Carlson CRD format.?ÿ There are two types of files one is alphanumeric point ids and the other is numeric only point ids which I never did use.?ÿ The point blocks are preceded by a header block.?ÿ The code I wrote reads and writes alphanumeric CRD files which I prefer over just being able to use only numeric point ids.?ÿ You are limited to a 10 character alphanumeric point id.?ÿ Any point id that is less than 10 chars need to be null filled and same for Desc field. For example point id ABC would actually look like this with a binary editor?ÿ ABC/0/0/0/0/0/0/0 (where /0 is the null character). Also note that the alphanumeric file MUST be sorted when saved using a natural sort order.?ÿ In the past Carlson would have issues listing points in the proper sequence if you did not sort the file properly.?ÿ Please note the attached does not document the newer *.crdb format which is the SQLlite database.

Let me know if you have any other questions.

Best regards,

Terry

?ÿ

?ÿ

 
Posted : 02/11/2021 2:56 pm
(@peter-lothian)
Posts: 1068
Noble Member Registered
 

One major advantage to the *.crdb SQLite format is that you can LOCK the points in the database. That's a very helpful feature in an office with multiple users. Especially when some of the users are still in training.

 
Posted : 03/11/2021 5:15 am
 jph
(@jph)
Posts: 2332
Famed Member Registered
 

@peter-lothian?ÿ

Which is why I do everything on my C drive, and then back up on the server.?ÿ Yeah, IT hates that, but I'm a rebel

 
Posted : 03/11/2021 6:23 am
(@ladd-nelson)
Posts: 734
Prominent Member Registered
 

@dbarrow In addition to the other information provided within the thread, attached is a copy of of the Carlson Coordinate File API?ÿ documentation that I have (current Help topic is missing, I've alerted the Carlson development team regarding this). The attached API document may not be fully inclusive (consult with the on-line documentation that comes with the product for additional information). I hope this information helps.

 
Posted : 03/11/2021 11:49 am
(@dbarrow)
Posts: 4
New Member Registered
 

Thanks alot guys. Never thought I would get this much input.?ÿ The .fas API looks promising.?ÿ Maybe I can create a .net wrapper for the lisp file.?ÿ If progress is made, I will keep you posted.

?ÿ

Thanks again,

Darryl

 
Posted : 03/11/2021 12:17 pm
(@tnygaard)
Posts: 21
Eminent Member Registered
 

Darryl,

Not sure exactly all you are trying to do but there is a good Nuget package that can access the SQLlite Carlson crdb files.?ÿ Here is some sample VB.Net code (can be easily converted to C#) I was playing around with some time back to read crdb files.

Best regards,

Terry

?ÿ

'========================================================================================================
'Note this SQL lite function
'========================================================================================================
'
'Project will need the SQLite package from NuGet installed and a reference added for (DotNet 4.5 and above):
'
'Imports System.Data.SQLite
'More info: https://www.nuget.org/profiles/SQLite
'
'SQLite reader can return these types
'Function GetBoolean(int i) As Boolean
'Function GetByte(int i) As Byte
'Function GetChar(int i) As Char
'Function GetDateTime(int i) As DateTime
'Function GetDecimal(int i) As Decimal
'Function GetDouble(int i) As Double
'Function GetFloat(int i) As Single
'Function GetGuid(int i) As Guid
'Function GetInt16(int i) As Short
'Function GetInt32(int i) As Integer
'Function GetInt64(int i) As Long

Public Sub GetSqlLiteInfo()
Dim strSettings As String
Dim dbConnection As SQLiteConnection
Dim sqCmd As SQLiteCommand
Dim sqDr As SQLiteDataReader

'This function scans all Coordinate tables of the newer Carlson SQLite coordinate file
'These newer coordinate files have a .crdb file extension
strSettings = "DataSource=" & "C:CogoTERRY_CARLSON.crdb"
dbConnection = New SQLiteConnection(strSettings)
dbConnection.Open()

sqCmd = dbConnection.CreateCommand
sqCmd.CommandText = "SELECT P,N,E,Z,D,LockStatus FROM Coordinates"
sqDr = sqCmd.ExecuteReader

While sqDr.Read
Dim sPid As String = sqDr.GetString(0)
Dim dNo As Double = sqDr.GetDouble(1)
Dim dEa As Double = sqDr.GetDouble(2)
Dim dEl As Double = sqDr.GetDouble(3)
Dim Desc As String = sqDr.GetString(4)
Dim LockStat As Int32 = sqDr.GetInt32(5)
'Console.WriteLine($"{sPid}, {dNo}, {dEa}, {dEl}, {Desc}, {LockStat}")
End While

dbConnection.Close()

End Sub

?ÿ

 
Posted : 03/11/2021 7:23 pm
(@dbarrow)
Posts: 4
New Member Registered
 

Currently, I have a c# wpf app that takes a solar system array dxf as input and builds blocks, rows and piles of the system.?ÿ I can then iterate through the system and build a stake out depending on different options.?ÿ Once stakeout is generated, the points are written to a csv file and then imported back into to carlson.

I am now porting this over to an autocad plugin and do all the processing in cad and then once points are generated, write carlson points directly to screen and store to the crd.

The plugin can now select objects needed for input and generates the stake points. Now to get those stake points to the screen and in the crd is the task.

Thanks,

Darryl

 
Posted : 04/11/2021 1:38 am
(@dbarrow)
Posts: 4
New Member Registered
 

I have created a c# .net wrapper for the carlson lisp file.?ÿ It can be found on github @ https://github.com/dbarrow/CarlsonCrd

The following functions are implemented:

  • CrdOpen
  • CrdClose
  • CrdAddPoint
  • CrdDraw

If anyone needs more functions, let me know.

 
Posted : 05/11/2021 11:07 am
Share: