cmdImport = (Rhino.Command("!_ImportDimStyles", “strDesktop”, “_Enter”))
I cannot for the life of me figure out the syntax to input the string from folder1 and hit enter…
strDesktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & “\TemplatesForRhino\DimStyle.3dm”
I also cannot find a way to access %userprofile% to bypass username and go straight to desktop.
I have messed with the syntax for 2 hours. Can’t get it right… Anyone steer me in the right direction?
pascal
(Pascal Golay)
January 21, 2019, 4:04pm
2
Hello - try this -
Rhino.Command("ImportDimStyles " & chr(34) & strDesktop & chr(34) & " Enter”)
-Pascal
Getting an unterminated string constant error.
Dim strFolder, cmdImport, strDesktop
strDesktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & “\TemplatesForRhino\DimStyle.3dm”
Rhino.Command("ImportDimStyles " & chr(34) & strDesktop & chr(34) & " Enter”)
Rhino.AddAlias “ImportStyle”, “_NoEcho _-Runscript ImportStyle”
So this line:
Rhino.Command("_-ImportDimStyles" & strFolder)
Results in this happening:
Unknown command: _-ImportDimStylesC:\Users\Jmartin\Desktop\TemplatesForRhino\DIMSTYLE.3dm
I tried your original @pascal and it failed to work as well.
Ideas?
I gave up on finding the %userprofile% enviroment for now until i can get this line of code to work! One thing at a time!
just be aware that " is not the same as ” inconsistent double quotation might lead to problems.
Ncik
January 23, 2019, 12:16am
8
Looks like there might be a space missing…
_-ImportDimStyles C:\Users\Jmartin\Desktop\TemplatesForRhino\DIMSTYLE.3dm
I have checked both encephalon and ncik suggestions and neither turned up with any results. Appreciate the feedback guys! Something you would think so simple!