viewbase macro problem

viewbase macro problem

geraldbossink
Enthusiast Enthusiast
553 Views
6 Replies
Message 1 of 7

viewbase macro problem

geraldbossink
Enthusiast
Enthusiast

Working with ACAD2023 on Win10Pro, I'm trying to write a macro for a viewbase-command:

 

^C^C-viewbase;m;h;v;o;c;s;0.1;e;r;all;add;\\

 

The command needs to run the viewbase command, change to Mspace, deselect all and add the selected opbjects. Everything runs fine, until the add-part. For some reason, after ...r;all; some objects stay selected and the 'add' gives a problem:

 

Command: -viewbase

VIEWBASE

Specify model source [Model space/File] <Model space>: m

Specify location of base view or [Type/sElect/Orientation/Hidden lines/Scale/Visibility] <Type>: h

Select style [Visible lines/vIsible and hidden lines/Shaded with visible lines/sHaded with visible and hidden lines] <Visible and hidden lines>: v

Specify location of base view or [Type/sElect/Orientation/Hidden lines/Scale/Visibility] <Type>: o

Select orientation [Current/Top/Bottom/Left/Right/Front/BAck/SW iso/SE iso/NE iso/NW iso] <Front>: c

Specify location of base view or [Type/sElect/Orientation/Hidden lines/Scale/Visibility] <Type>: s

Enter scale <0.001>: 0.1

Specify location of base view or [Type/sElect/Orientation/Hidden lines/Scale/Visibility] <Type>: e

Restoring cached viewports.

Command:

Select objects to add or [Remove/Entire model/LAYout] <return to layout>: r

Select objects to remove or [LAYout]: all

726 found

Select objects to remove or [LAYout]: add

Select objects to add or [Remove/Entire model/LAYout] <return to layout>:

52 found, 52 total

 

What am I missing here?

0 Likes
554 Views
6 Replies
Replies (6)
Message 2 of 7

cadffm
Consultant
Consultant

Hi,

 

>>"What am I missing here?"

 

I am missing here the original text log, it looks like you posted not the original one.

How did you copy this log, from where and how did you copied?

 

>>"What am I missing here?"

How should we know that without your drawing (is it drawing dependend?)

and without to know your both clickpoint for your object selection?

 

 

And if the problem is really random: Nobody can fix a random problem,

you need to find more details about the issue.

 

After "remove all", when AutoDESK asking for (add) objects, in this moment: Can you see highlighted/selection objects?

(this is what I imagine frome your post)

 

 
 

 

 

Sebastian

0 Likes
Message 3 of 7

geraldbossink
Enthusiast
Enthusiast

@cadffm: the log is copied from the text window after running the command, it's the original one. And since the porblem is drawing-independent I didn't post the drawing. In my opinion it's something in the macro I'm missing, not something in the drawing.

Running the series of commands on the command line manually works fine, when putting it in a macro it isn't

0 Likes
Message 4 of 7

cadffm
Consultant
Consultant

ahh okay, my fail:

The textlog was different because I compared it with a manually typed in sequence,

in this case the feedback of object selection looks like:

 

Select objects to remove or [LAYout]: all
3 found, 2 removed, 0 total

instead of the macro feedback

 

Select objects to remove or [LAYout]: all

2 found

 

-

 

Back to the topic:

>>". In my opinion it's something in the macro I'm missing, not something in the drawing."

So is it a problem in every file, in every macro-run you trying?

Or random...?

 

 

Sebastian

0 Likes
Message 5 of 7

cadffm
Consultant
Consultant

NOW I can see what you see!

crazy

If I have time for it, I will send my feedback.

 
 

 

 

Sebastian

0 Likes
Message 6 of 7

geraldbossink
Enthusiast
Enthusiast

It looks like a problem I had with a join command. In that case the macro ran an older join-command than when typed in the command line or using the join-button in the ribbon (old join command didn't allow multiple object selection, new join-command did). Solution in that case was to add ^R in front of the join-command in the macro, in order to run the new join-command. I tried this for the viewbase-command, but didn't work out.

0 Likes
Message 7 of 7

cadffm
Consultant
Consultant

Join command: Right, that was another thing you stumbled over.

 

1. The Viewbase command (not -viewbase) , started by hand or by macro is the same "version",

but the switch "from remove all to the ADD method" works differently 😕

 

2. Looks like a kind of bug, send feedback to AutoDESK or start a supportcase or any other way to inform about this issue.

  Not related to 2023! (did you searched about this problem in older posts? I didn't)

 

3.  If you can't find a solution, go the workaround, for example by Lisp-Command

(command "_.VIEWBASE" "_m" "_h" "_v" "_o" "_c" "_s" "0.1" "_e" "_r" "_all" "_add" (ssget "_:S"))

or

(command "_.VIEWBASE" "_m" "_h" "_v" "_o" "_c" "_s" "0.1" "_e" "_r" "_all" "_add" (ssget "_:S") "" PAUSE)

or

(command "_.VIEWBASE" "_m" "_h" "_v" "_o" "_c" "_s" "0.1" "_e" "_r" "_all" "_add" (ssget "_:S") "" PAUSE "")

 

"" means <enter> or ;

"whatever" means whatever<enter> or whatever;

PAUSE means ONE userinput or \

 

 

 

Sebastian

0 Likes