Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


SouthernGeek

72 posts

Master Geek
+1 received by user: 47


#288456 30-Jun-2021 17:54
Send private message

So Im using Solidworks, with client 3D models.

 

 

 

The client has their templates on a local server that is UNC mapped to something like "\\srv\templates\SHEET FORMATS\SX-A3.slddrt"

 

Obviously on my computer I do not have that drive. I have thousands of files I need to access/update and every time I try to change the templates there is a VERY long pause while Solidworks tries to resolve \\srv\..... it is amking the system almost unusable.

 

 

 

I have all the right templates etc (in a different folder). Is there any way I can fool my system into thinking a folder on my hard drive is that address so it will just resolve quickly and move on?

 

 

 

Otherwise I am going to have a very bad month!

 

 

 

Thanks for any help guys!!


Filter this topic showing only the reply marked as answer Create new topic
Oblivian
7345 posts

Uber Geek
+1 received by user: 2117

ID Verified

  #2737018 30-Jun-2021 18:43
Send private message

edit hosts for srv 127.0.0.1

 

Will take care of the resolving. But finding the rest of the path becomes.. tricky?.

 

In my head if you then had a windows share at the 'templates' level with the same sub structure it mayyyyy find it?

 

 

 

/edit.. actually. It seems hosts will only do IP resolve. When LMHosts may do UNC resolve :)

 

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc959846(v=technet.10)?redirectedfrom=MSDN 




Dolts
214 posts

Master Geek
+1 received by user: 76


  #2737045 30-Jun-2021 19:52
Send private message

Change your pc name to 'srv'

 

Then when you do a local share, you can map to \\srv\templates\SHEET FORMATS

 

When you are finished, change your pc name back.


fe31nz
1294 posts

Uber Geek
+1 received by user: 423


  #2737096 1-Jul-2021 00:42
Send private message

I think it would work if you set up a Linux virtual machine and named it srv.  Use bridged networking.  Put the IP address of srv in your hosts file.  Then set up SAMBA and CIFS on the VM.  Give the VM SMB access to the Windows PC.  Use a CIFS mount in fstab to mount the place on the windows PC where the templates actually are and get SAMBA to point to there with the correct directory structure.  Here is a working fstab CIFS mount from one of my Ubuntu 20.04 boxes to my Windows 10 PC:

 

//10.0.2.2/CDRIVE /mnt/savaidh/cdrive cifs soft,username=stephen1,password=password,file_mode=0777,dir_mode=0777  0 0

 

(obviously, I have changed the password).  The "stephen1" user is one I have set up for this sort of thing, as I do not have a password on my normal user on my Windows box, and SAMBA connections to a Windows box require a password and fail with null passwords.  So in your case, to make a UNC like //srv/templates work, the fstab entry might look something like this:

 

//192.168.1.3/CDRIVE/Users/<your name>/Documents/Solidworks/templates /templates cifs soft,username=<your name>,password=<your password>,file_mode=0777,dir_mode=0777  0 0

 

and then in your /etc/samba/smb.conf file you would have a section something like this:

 

[templates]

 

path = /templates

 

public = yes

 

read only = no

 

Since it is running in a VM on the same PC, having public access set is not a problem unless you allow external access to the VM.  If you want to hide the password in fstab, you can use a credentials file with only access from root - fstab normally is readable by any user.


Filter this topic showing only the reply marked as answer Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.