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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

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

rrajendran-3
1-Newbie

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.

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

2 REPLIES 2

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

That is helpful, thank you!

Announcements


Top Tags