зеркало из https://github.com/softlandia/acadlib.git
rename regAcad.go -> acadlib.go
This commit is contained in:
Родитель
3760b5cfc1
Коммит
b2063516df
|
@ -41,36 +41,40 @@ func RegPathAutocadLogFile() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
path := _RegPathAcad
|
||||
/* path := _RegPathAcad
|
||||
key, err := registry.OpenKey(registry.CURRENT_USER, path, registry.QUERY_VALUE)
|
||||
defer key.Close()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
s, _, err := key.GetStringValue("CurVer")
|
||||
if err != nil {
|
||||
return ""
|
||||
}*/
|
||||
|
||||
s := ReleaseAutocadInstalled()
|
||||
if s == "" {
|
||||
return ""
|
||||
}
|
||||
path := _RegPathAcad + "\\" + s // s like "Software\Autodesk\AutoCAD\R19.0"
|
||||
key, err := registry.OpenKey(registry.CURRENT_USER, path, registry.QUERY_VALUE)
|
||||
defer key.Close()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
s, _, err := key.GetStringValue("CurVer")
|
||||
s, _, err = key.GetStringValue("CurVer") // s like "ACAD-B001:409"
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
path = path + "\\" + s
|
||||
path = path + "\\" + s // s like "Software\Autodesk\AutoCAD\R19.0\ACAD-B001:409\Profiles\<<Unnamed Profile>>\Editor Configuration"
|
||||
key, err = registry.OpenKey(registry.CURRENT_USER, path, registry.QUERY_VALUE)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
s, _, err = key.GetStringValue("CurVer")
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
path = path + "\\" + s
|
||||
key, err = registry.OpenKey(registry.CURRENT_USER, path, registry.QUERY_VALUE)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return path + _RegPathAcadEditor
|
||||
return path + _RegPathAcadEditor // s like "Software\Autodesk\AutoCAD\R19.0\ACAD-B001:409\"
|
||||
}
|
||||
|
||||
//PathAutocadLogFile - return path to folder where AutoCAD store log file
|
Загрузка…
Ссылка в новой задаче