cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Highlighted

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.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

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

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 2

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

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  |+|

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

That is helpful, thank you!