Skip to main content
1-Visitor
Apr 5, 2016 4:33 PM UTC
Solved

Why model.GetDescr().GetPath() in Jlink API doesn't include the root (C: or E: or D:) in the path?

For example, for drawings from "C:\myFolder\myProject" or  "E:\myFolder\myProject" the function model.GetDescr().GetPath() retrieves only "\myFolder\myProject" and omits the drive letter or the root folder.

I would need the full path to differentiate if the file is from Local disk or Removable disk.

1-Visitor
Apr 5, 2016 4:56 PM UTC

I haven't used Model.GetDescr in JLink, as far as I know.

For example, for drawings from "C:\myFolder\myProject" or  "E:\myFolder\myProject" the function model.GetDescr().GetPath() retrieves only "\myFolder\myProject" and omits the drive letter or the root folder.

I would need the full path to differentiate if the file is from Local disk or Removable disk.

Model.GetDescr returns a ModelDescriptor object. The method ModelDescriptor.GetDevice might give you the drive letter. You could try ModelDescriptor.GetFullname.

|+|  M a r k  |+|

2 replies

1-Visitor
Apr 5, 2016 4:56 PM UTC

I haven't used Model.GetDescr in JLink, as far as I know.

For example, for drawings from "C:\myFolder\myProject" or  "E:\myFolder\myProject" the function model.GetDescr().GetPath() retrieves only "\myFolder\myProject" and omits the drive letter or the root folder.

I would need the full path to differentiate if the file is from Local disk or Removable disk.

Model.GetDescr returns a ModelDescriptor object. The method ModelDescriptor.GetDevice might give you the drive letter. You could try ModelDescriptor.GetFullname.

|+|  M a r k  |+|

Translate
1-Visitor
Apr 5, 2016 6:48 PM UTC

That is helpful, thank you!

Translate