VBScript Move object

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
rosol
Newcomer
Posts: 2
Joined: Tue Jul 05, 2016 12:33 am

VBScript Move object

Post by rosol » Tue Jul 05, 2016 12:37 am

Hello,
I have a problem with VBscript and move function, there is syntax validation error with this code:

Code: Select all

For counter = 1 To 30
      if label.objects.item(counter).Name = "size6" Then
          label.objects.item(counter).Move(30,40)
      exit for
      end if
   Next
Cannot execute procedure on parent objects

Can you help me? I'm looking for a solution to set position dynamically for text on label

User avatar
Saso
NiceLabel
NiceLabel
Posts: 2929
Joined: Mon Sep 04, 2006 8:09 am
Contact:

Re: VBScript Move object

Post by Saso » Mon Aug 29, 2016 3:19 pm

Hmm, this works for me. :-k
See the attached sample.
Attachments
sample-move object.lbl
(70 KiB) Downloaded 195 times
Saso Fleiser
Senior Technical Product Specialist

rosol
Newcomer
Posts: 2
Joined: Tue Jul 05, 2016 12:33 am

Re: VBScript Move object

Post by rosol » Wed Feb 08, 2017 3:56 pm

How to do that in NiceLabel 2017?
'label' object is required
How to deal with conditional/move objects in Nice Label 2017 in vbscript or python?

jplv
Valued Contributor
Posts: 26
Joined: Thu Nov 19, 2009 10:37 pm

Re: VBScript Move object

Post by jplv » Mon Jun 11, 2018 6:35 pm

So is there no answer to this yet? I am running into the same problem. It worked fine in Nicelabel 6 but now that I've upgraded to 2017 it's not working.

User avatar
Saso
NiceLabel
NiceLabel
Posts: 2929
Joined: Mon Sep 04, 2006 8:09 am
Contact:

Re: VBScript Move object

Post by Saso » Tue Jun 12, 2018 8:59 am

In NiceLabel 2017, the programmable access to label interface from the label itself is no longer supported.

If you want to reposition objects on the label, you can try one of the following:
  • Use the relative object positioning. Each label object can change position based on some object on the same or back side of the label, or based on the label edge (useful when you have variable-sized label). Find the option in Design ribbon, tab Positioning, Relative Position.
  • Use the .NET API. You can control the label programmable from your custom .NET application. See the API reference here:

    Code: Select all

    c:\Program Files\NiceLabel\NiceLabel 2017\Help\SDK\SDK Reference.chm
Saso Fleiser
Senior Technical Product Specialist

Post Reply