Pat Stanford Posted August 25, 2022 Share Posted August 25, 2022 I am working on a project for a PIO that uses $INCLUDE files. If the PIO is in the Plug-Ins folder of the user folder and the $Inlcude file is in a subfolder also in the Plug-ins folder then a line of: {$INCLUDE Subfolder:Include_File.vss} works great. If I move the Subfolder and the PIO file to a workgroup folder, the PIO can not find the include file. Has anyone else seen this? Is there a trick I need to know to make a PIO in a workgroup folder see the relative path include files? Thanks. Quote Link to comment
Peter Vandewalle Posted August 25, 2022 Share Posted August 25, 2022 When I was programming in VS, I always had the files in a workgroup folder. Maybe a stupid question, but after moving the files, did you restart Vectorworks? Shouldn't the include file be a .px file? Quote Link to comment
Pat Stanford Posted August 25, 2022 Author Share Posted August 25, 2022 Thanks Peter, Actually, it appears to be a change to VW. I was using the Mac style path delimiter of a colon : When I changed to a Windows style of a forward slash / it works fine in either location. I think I had already made the change to a slash in the one file I was testing in and had forgotten about it before I posted the problem. Now with slashes in all of the include paths it is working fine from the Workgroup folder. 1 Quote Link to comment
Sam Jones Posted August 26, 2022 Share Posted August 26, 2022 I have always had to specify the exact path. That exact path could be relative to the calling routine, but the path had to include the exact names/path of the location of the included file. The included file has always has to be a sub folder if the path is relative. I'm not sure if any of this has to do with your question. 1 Quote Link to comment
Sam Jones Posted August 26, 2022 Share Posted August 26, 2022 Oh yea, the delimiter needs to be a forward slash, and you got that. Quote Link to comment
MullinRJ Posted August 26, 2022 Share Posted August 26, 2022 A few versions ago I had trouble with existing scripts not working on the MAC when I used the backslash "\" delimiter in my $INCLUDE paths. They used to work on both the PC and the MAC. To solve the problem I switched the MAC pathnames to use the colon ":" delimiter. I'm still using colons on the MAC, and like Sam, I use absolute paths. I'm not sure how all of this plays into using relative paths. When I do use a Workgroup folder, colons still work — again, with absolute paths. Now here's the confusing part (at least for me.) After reading the posts above, I went back to a MAC script with lots of $INCLUDE files and replaced all the colon delimiters with forward slashes "/" — it worked. I then tried the backslash "\" — it worked. This is in VW 2022, so my take on this issue is I have no idea what is supposed to be used and what is to be avoided. It seems I can again use any of the three delimiters on the MAC. I haven't tried changing anything for scripts on the PC, but that environment still works with the backslash, and has for as long as I have used it, even when the $INCLUDEd files reside on the MAC, so I'm not about to mess with a working object there. For me, the beauty of using the backslash for a delimiter was that the same code could be used on the MAC and PC, except for specifying the Volume. After that, the paths were identical. Well, at least things are changing back to being more flexible. Raymond Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.