I've seen a couple of routines that are using "DWGPREFIX " to get the folder name in a network directory but then they have a couple of numbers after the substr. Here is an example:
(Setq dwgnm (substr (getvar "dwgprefix")5 2))
(Setq dwgnm1 (substr (getvar "dwgprefix")22 2))
Does anyone have any idea what this could be for? I've seen this in a couple of routines that have numbers as part of the substr but i dont know what it refers to.
Solved! Go to Solution.
Solved by mid-awe. Go to Solution.
substr allows you to get substrings from anywhere in a string. The first number is the index of where to start while the second is the string length to return. Hence, (substr "ABCD" 2 2) would return "BC". The examples you saw were probably getting a specific part of the path based off of a structured folder naming system.