乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 39|回复: 19

[编程交流] script problem: blank space in

[复制链接]

1

主题

9

帖子

8

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 10:06:43 | 显示全部楼层 |阅读模式
Hi to everyone,
 
this is my first post on the forum and I want to thanks to all of you will have patience to read my post.
 
I have a problem with the blank space in some filepaths of my script.
something like
 
C:\Documents and settings\test.txt
 
in a script line. AutoCAD consider the first blank space like an enter and of course it doesn't know the 'AND' command.
and my script doesn't work.
 
I know the most easy answer would be 'change your path in a different one without blank spaces!' but unfortunately I can't.
 
I don't know how to solve this problem. I heard AutoLISP is a stronger tool to use for that scope but I don't know anything about LISP. So I'll appreciate all of your tips and your help.
Thanks.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 10:10:48 | 显示全部楼层
You will find your answer here
 
http://lee-mac.com/scriptwriting.html
 
Welcome to CADTutor
回复

使用道具 举报

1

主题

9

帖子

8

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 10:13:26 | 显示全部楼层
Thank you very much Lee Mac!
I didn't think it could be so easy and thanks for your quick answer!
回复

使用道具 举报

20

主题

257

帖子

237

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
100
发表于 2022-7-6 10:17:24 | 显示全部楼层
for those without access to the link: just use "quotes"
 
"C:\Documents and settings\test.txt"
instead of
C:\Documents and settings\test.txt
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 10:21:46 | 显示全部楼层
 
You're welcome, I thought it would give a more complete answer, and maybe answer any other questions you might have
回复

使用道具 举报

1

主题

9

帖子

8

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 10:24:52 | 显示全部楼层
thanks designerstuart and thanks for your help guys!
I like this forum and I hope to be useful to someone in the future.
 
Maybe when I'll a little bit more skilled!
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2022-7-6 10:25:50 | 显示全部楼层
*cough* ScriptPro or AutoScript *cough*
回复

使用道具 举报

1

主题

9

帖子

8

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 10:30:31 | 显示全部楼层
Hi everyone,
 
maybe I should open a new thread but since this is the second step of my project after running script files in AutoCAD I write here.
 
I'd like to create a batch application (I use C#) that launch AutoCAD, minimize the AutoCAD window and execute the script file. I found ScriptPro (thanks alanjt!) with its source code and I saw it uses reflection to open and manage AutoCAD, but I don't find the way to minimize AutoCAD window in its code.
Did anybody of you make something similar in your experiences, maybe without reflection?
Thanks again.
回复

使用道具 举报

1

主题

1069

帖子

1050

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
69
发表于 2022-7-6 10:33:03 | 显示全部楼层
You might want to look at this page:
https://sites.google.com/site/bushmansnetlaboratory/lab/pof
(but the explantion is on Russian only - use web translator)
回复

使用道具 举报

1

主题

9

帖子

8

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 10:36:35 | 显示全部楼层
Thanks for your post fixo.
I'll take a look for sure to that page.
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-6 21:12 , Processed in 0.427344 second(s), 72 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表