乐筑天下

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

[综合讨论] 'spacetrans works until I

[复制链接]
YZ

27

主题

232

帖子

205

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
135
发表于 2022-7-6 23:31:08 | 显示全部楼层 |阅读模式
Any ideas why this works:
 
  1. SetEnv;TextUnderLine;'spacetrans;0.776;
but this doesn't: 
  1. SetEnv;TextUnderLine;'spacetrans;0.776;UCS;Object;Last;
 
It works perfectly when it is the last command in a macro. But as soon as I try to continue the macro, the spacetrans is ignored as if it were a standalone query, and the next command is entered as the value of the SetEnv.
回复

使用道具 举报

10

主题

598

帖子

594

银币

初来乍到

Rank: 1

铜币
48
发表于 2022-7-6 23:43:34 | 显示全部楼层
I can only offer a guess, in my experience other transparent commands behave the same, my guess is that calling a transparent command internally calls up a sort of subroutine, and that action causes the macro to stop at that point. I would love to find a solution, for me the problem is the 'cal command, so I hope someone else has more insight.
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-6 23:49:21 | 显示全部楼层
"Resuming SETENV command" Looks like you need an extra return to exit setenv
 
Snuck in Steven
回复

使用道具 举报

10

主题

598

帖子

594

银币

初来乍到

Rank: 1

铜币
48
发表于 2022-7-6 23:58:49 | 显示全部楼层
BIGAL could be. I haven't actually figured out yet what 'spacetrans does, its a new command for me. Anyways I have a slight revision to my answer above, I checked back to the problem I have with 'cal and what actually happens is that the results don't actually come back until after the macro finishes, so where you expect the results in the middle of a macro it doesn't happen, and therefore mucks up the order of things.
回复

使用道具 举报

YZ

27

主题

232

帖子

205

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
135
发表于 2022-7-7 00:10:12 | 显示全部楼层
 
Yeah that is what I observe. It works in command line, but sometimes the results are not available immediately. Steven do you mostly find it with diesel?
 
('spacetrans is very similar to 'cal, but it calculates the difference between papaerspace and your viewport, to return the value you'd have to draw a line at in your model space to appear in paperspace the length you specified.)
回复

使用道具 举报

10

主题

598

帖子

594

银币

初来乍到

Rank: 1

铜币
48
发表于 2022-7-7 00:14:25 | 显示全部楼层
Yup, probably because diesel sends the macro off to the diesel interpreter, and everything works differently there.
At least in diesel you can to some extents control the program sequence by using brackets (but that is a whole other story of frustration)
I have in the past had to use 2 or more macro's or scripts to get the results I want, and haven't managed yet to find a way to get around that (even calling 2 scripts from within a single macro results in the same odd behaviour)
回复

使用道具 举报

10

主题

598

帖子

594

银币

初来乍到

Rank: 1

铜币
48
发表于 2022-7-7 00:22:41 | 显示全部楼层
Without seeing the rest of your macro, would it not be possible to rearrange the macro, so you change the UCS first and then set the value of TextUnderLine as the last command.
回复

使用道具 举报

YZ

27

主题

232

帖子

205

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
135
发表于 2022-7-7 00:37:32 | 显示全部楼层
No, the macro will be longer than just this. I want to use the value as the displacement of a move command.
 
I have created the spacetrans result using a diesel calculation:
 
  1. ^C^CSetEnv;TextUnderLine;$M=$(/,0.8,$(GetVar,CANNOSCALEVALUE));
 
Having better success with that now.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-10 04:51 , Processed in 0.751327 second(s), 68 queries .

© 2020-2025 乐筑天下

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