OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   Feature requests/wishlist (http://forum.oberonplace.com/forumdisplay.php?f=33)
-   -   Oberon Thumbnailer - Image positioning (http://forum.oberonplace.com/showthread.php?t=6905)

gorgo2 25-03-2010 18:53

Oberon Thumbnailer - Image positioning
 
Hi there macro monsters. I'd like to know if there is a way to allow off-center positioning of the thumbnail array where you could set a .5" offset at the left edge and 2" offset at the right edge?

Basically I am looking for a left and right margin setting for what I want. Thanks you for your time.

-Greg

gorgo2 26-03-2010 19:59

Is no one answering because they don't know or just don't have time to reply?;)

-Greg

runflacruiser 26-03-2010 21:51

Sorry.
I've been pretty busy..TGIF.

Margins in Alex's macro are used as a calculation for how many thumbnails will fit. The easiest way to do it, without re-writing the advanced code he uses would be to use

Code:


ActiveDocument.ReferencePoint = cdrBottomLeft
ActivePage.Shapes.All.SetPosition x, y

where x and y are the bottom corner of where you want to position the entire pages of thumbs.

You could even simply use

Code:


ActivePage.Shapes.All.Move x, y

where x would represent say -1 for odd page numbers and 1 for even page numbers.
I think this is what your trying to do.

l'll have to do some digging as to where to put the small code addition but it's time for dinner...!

-John

runflacruiser 27-03-2010 13:17

Ok.
If you want to try that method I decribed above here's were I think you can add the code.
I didn't test it yet. Find it in the main form.

Code:


        If nPageCount < nPageCount2 Then
            For n = nPageCount2 To nPageCount + 1 Step -1
                ActiveDocument.Pages(n).Delete
            Next n
        End If
       
        nx = nx + 1
        nCurrent = nCurrent + 1
        If nx >= CountX Then
            nx = 0
            ny = ny + 1
            If ny >= CountY Then
                ny = 0
                If nCurrent < nCount Then
                'enter code here begin -----------------
               
               
                'enter code here end -----------------
                    ActiveDocument.AddPages 1
                End If
            End If
        End If
    Next f
    bProcessing = False
    lblProgress.Caption = ""
    cmAbort.Visible = False
    cmOK.Visible = True
    cmCancel.Visible = True
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    If bProcessing Then
        bAborted = True
    End If
End Sub

-John

gorgo2 29-03-2010 19:12

Okay...will try this. Thanks much John.
:D

gorgo2 29-03-2010 19:25

While I'm working on the changes to the thumbnailer....I'd like to assign a object ID to each photo that is imported like the page numberer does. This way I can make a "Clear" button that will wipe out all of the imported photos so the user can tweak their settings and try again if they aren't happy with the first try.

I think I might need something like this planted somewhere in the code:
Code:

strLabelName = "thumbNail"

Private Sub cmdClear_Click()

  Call DeleteLabels("thumbNail")

End Sub

-Greg

gorgo2 29-03-2010 19:40

Quote:

Originally Posted by runflacruiser (Post 16178)
Ok.
If you want to try that method I decribed above here's were I think you can add the code.
I didn't test it yet. Find it in the main form.

Code:


        If nPageCount < nPageCount2 Then
            For n = nPageCount2 To nPageCount + 1 Step -1
                ActiveDocument.Pages(n).Delete
            Next n
        End If
       
        nx = nx + 1
        nCurrent = nCurrent + 1
        If nx >= CountX Then
            nx = 0
            ny = ny + 1
            If ny >= CountY Then
                ny = 0
                If nCurrent < nCount Then
                'enter code here begin -----------------
               
               
                'enter code here end -----------------
                    ActiveDocument.AddPages 1
                End If
            End If
        End If
    Next f
    bProcessing = False
    lblProgress.Caption = ""
    cmAbort.Visible = False
    cmOK.Visible = True
    cmCancel.Visible = True
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    If bProcessing Then
        bAborted = True
    End If
End Sub

-John

This might be a silly question, but how does this new code work with the current GUI? Should I make a left and right margin setting box?

runflacruiser 29-03-2010 19:46

Quote:

Originally Posted by gorgo2 (Post 16185)
While I'm working on the changes to the thumbnailer....I'd like to assign a object ID to each photo that is imported like the page numberer does. This way I can make a "Clear" button that will wipe out all of the imported photos so the user can tweak their settings and try again if they aren't happy with the first try.

I think I might need something like this planted somewhere in the code:
Code:

strLabelName = "thumbNail"

Private Sub cmdClear_Click()

  Call DeleteLabels("thumbNail")

End Sub

-Greg

It may be better just to create a new catalog. But depending on the size of your catalog you could use activedocument.begincommandgroup and activedocument.endcommandgroup to create an undo.

-John

gorgo2 31-03-2010 18:07

Quote:

Originally Posted by runflacruiser (Post 16178)
Ok.
If you want to try that method I decribed above here's were I think you can add the code.
I didn't test it yet. Find it in the main form.

Code:


        If nPageCount < nPageCount2 Then
            For n = nPageCount2 To nPageCount + 1 Step -1
                ActiveDocument.Pages(n).Delete
            Next n
        End If
       
        nx = nx + 1
        nCurrent = nCurrent + 1
        If nx >= CountX Then
            nx = 0
            ny = ny + 1
            If ny >= CountY Then
                ny = 0
                If nCurrent < nCount Then
                'enter code here begin -----------------
               
               
                'enter code here end -----------------
                    ActiveDocument.AddPages 1
                End If
            End If
        End If
    Next f
    bProcessing = False
    lblProgress.Caption = ""
    cmAbort.Visible = False
    cmOK.Visible = True
    cmCancel.Visible = True
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    If bProcessing Then
        bAborted = True
    End If
End Sub

-John

Hi John. I plugged this in and I don't see what it's suppose to do. What's the next step please?

-Greg

runflacruiser 01-04-2010 15:30

Hi.

After creating all of the thumbnails on the page, and before moving to the next page to begin creating more, it should take the entire pages shapes (activepage.shapes.all) and either move them (.move x,y) or set their position (.setposition x,y)

Did you test it?

-John

gorgo 01-04-2010 23:58

I'll give it a go tomorrow on this macro and let you know what happens. Thanks much.

-Greg

gorgo 30-05-2010 23:16

1 Attachment(s)
Hey! I just can’t seem to work this out with the THUMBNAILER macro you helped me with a while back. I’m still trying to get the thing to make the thumbnails be referenced to the bottom left corner of the 11 x 17 page so check out the attached gms wont’ you please? I used your code from the Oberon forums but it does not work….



Also, see image example of what I’m trying to achieve.

Thanks a bunch John or others that can help with this!

runflacruiser 30-05-2010 23:35

Hi.
Here's the modified section code that sets position of all thumbnails on the page(s). (lightly tested)
Notice the comments.
This is a fix to reposition thumbnails on page. Modifying someone else's code, especially Alex's, is not always easy...lol

-John


Code:

        nx = nx + 1
        nCurrent = nCurrent + 1
        If nx >= CountX Then
            nx = 0
            ny = ny + 1
           
            If ny >= CountY Then
                ny = 0
               
                If nCurrent < nCount Then
                    myAdjust 'added this line
                    ActiveDocument.AddPages 1
                End If
            End If
        End If
    Next f
    myAdjust 'added this line
    bProcessing = False
    lblProgress.Caption = ""
    cmAbort.Visible = False
    cmOK.Visible = True
    cmCancel.Visible = True
End Sub

Private Sub myAdjust() 'added this whole sub
    ActiveDocument.ReferencePoint = cdrBottomLeft
    ActivePage.Shapes.All.SetPosition 0, 0 'adjust position here.
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

-John

gorgo 31-05-2010 00:21

YES! We're almost there and making progress. As I understand this, the thumbs are positioned after the fact at 0,0 cdrbottomleft. That's what I was trying to achieve...so now I want to set up the form so the user can enter a value and finally position them thumbs centered vertically yet offcenter horizontally like my sample image above. I can set this by entering something like 1,4 or something like that but if the user wants a different config then I'll have to keep changing the code...not too smooth I suppose. So using a textbox value to have control over exactly where to put the array of thumbs would be most excellent and complete my request. If not, then I could attempt somethings....end if.:D

-Greg

gorgo 31-05-2010 02:23

1 Attachment(s)
also, trying to get control over vertical spacing between images as shown...

gorgo 31-05-2010 04:34

1 Attachment(s)
**update**
I got it how I want it...but still some glitches.
something weird happens if I change cdrBottomLeft to cdrTopLeft which is really what I wanted but go confused. The unwanted positionion happens when the next page is inserted and there are maybe three or so thumbnails left and they are moved to the bottom and I want them to go to the top area hence the cdrTopLeft. Check it out when you can good sir.

-Greg

runflacruiser 31-05-2010 10:35

Hi.
If you change reference point to top left you can adjust position like this(untested):

Code:

Private Sub myAdjust() 'added this whole sub
    ActiveDocument.ReferencePoint = cdrTopLeft
    ActivePage.Shapes.All.SetPosition 0, ActivePage.SizeHeight 'adjust position here.
End Sub

-John

gorgo 31-05-2010 11:09

Okay, I'm on it...I've added some fun features besides that I've always wanted but didn't know how...boy did I lose some sleep but it was worth it!

_Greg:sun::confused::D

gorgo 31-05-2010 11:24

Quote:

Originally Posted by runflacruiser (Post 16610)
Hi.
If you change reference point to top left you can adjust position like this(untested):

Code:

Private Sub myAdjust() 'added this whole sub
    ActiveDocument.ReferencePoint = cdrTopLeft
    ActivePage.Shapes.All.SetPosition 0, ActivePage.SizeHeight 'adjust position here.
End Sub

-John

Okay...looks real good! I had to do this
Code:

    ActivePage.Shapes.All.SetPosition 0.5, ActivePage.SizeHeight - 1 'adjust position here
so that the thumbs are spaced away from the top but the last remaining are top justified....now if I could set the form to make these changes I'll be complete....if you don't want to bother, that's fine.

-Greg

runflacruiser 31-05-2010 11:50

Hi.
Just create a couple textboxes and reference them in code like this:

Code:

ActivePage.Shapes.All.SetPosition MainForm.myTextBoxValueX.value, MainForm.myTextBoxValueY.value
-John

gorgo 31-05-2010 23:21

one little glitch i created...trying to fix.
I was trying to group all thumbs on the page after importing and scaling down before going to the next page. it work...but it groups all objects on each page which could be a problem since there is the titleblock and such. see goofup code.
Code:

        nPageCount2 = ActiveDocument.Pages.Count
        On Error GoTo 0
        If ActiveShape Is Nothing Then
            sr.add ActiveLayer.CreateLineSegment(X, Y, X + cfg.Width, Y + cfg.Height)
            sr.add ActiveLayer.CreateLineSegment(X, Y + cfg.Height, X + cfg.Width, Y)
            sr.Group
            sr.RemoveAll
        Else
            If ActiveSelection.Shapes.Count > 1 Then
                Set s = ActiveSelection.Group
                bGrouped = True
            Else
                Set s = ActiveShape
                bGrouped = True
            End If

Apart from the whole thumb positioning...this should be simple, right? I suppose it's a small change somewhere to tell the macro to group only the thumbs...hmmm and ideas?

runflacruiser 01-06-2010 11:28

Hi.
Group all thumbs on page?
This will, and set size too.
I think this is what you meant.

-John

Code:

Private Sub myAdjust() 'added this whole sub
    Dim s As Shape
    ActiveDocument.ReferencePoint = cdrTopLeft
    Set s = ActivePage.Shapes.All.Group
    s.SetPosition 0, ActivePage.SizeHeight 'adjust position here.
    s.SetSize , 5 'change size here, leave one value blank for proportional size
End Sub


gorgo2 01-06-2010 19:07

do this for me please John. Set your drawing page to 11 x 17 tabloid size. Draw a rectangle 2" wide x 10" height.
Now use the thumbnailer with matrix of 4 x 4 thumbs and see what happens.
The macro is now selecting the rectangle as well as the thumbs (this is probably because of shapes.all I suppose) and moving it around....would you test the gms I sent you when you get a chance...?

-Greg

runflacruiser 01-06-2010 20:10

Hi.


The macro should be creating a catalog on a fresh new document.
I tested and this is what happens. The created rectangle would be on the prior document.

It works fine with the added code from above as below. It puts the thumbs on side of page (top left) and groups, sizes them.
Remember you can always put any code to want in the adjust sub, that will move, size, modify the page thumbs. Notice I put the call to myAdjust in 2 spots. One spot is in case the catalog only has a few thumbs and terminates before new page is created, and one right before a new page is created.

Code:

        nx = nx + 1
        nCurrent = nCurrent + 1
        If nx >= CountX Then
            nx = 0
            ny = ny + 1
            If ny >= CountY Then
                ny = 0
                If nCurrent < nCount Then
                    myAdjust '<<<<<<<<<<<<<<<<<-------added this
                    ActiveDocument.AddPages 1
                End If
            End If
        End If
    Next f
    myAdjust '<<<<<<<<<<<<<<<<<-------added this
    bProcessing = False
    lblProgress.Caption = ""
    cmAbort.Visible = False
    cmOK.Visible = True
    cmCancel.Visible = True
End Sub

Private Sub myAdjust() 'added this whole sub '<<<<<<<<<<<<<<<<<-------added this
    Dim s As Shape
    ActiveDocument.ReferencePoint = cdrTopLeft
    Set s = ActivePage.Shapes.All.Group
    s.SetPosition 0, ActivePage.SizeHeight 'adjust position here.
    s.SetSize , 5 'change size here, leave one value blank for proportional size '<<<<<<<<<<<<<<<<<-------added this

-John

gorgo 02-06-2010 01:30

I begin to wonder if Alex is watching all of this and laughing to himself...:confused:

runflacruiser 02-06-2010 09:12

Hi.

Actually I was kinda wondering the same.

-John

olympiatr 12-05-2017 03:33

so, what about if we need to use another way?
 
hi folks, many times i just surfin around forum, and surely Thumbnailer is my favourite ;) and i just think what if we need another way instead of folder? can we use way of csv or txt files list? (i just asked, if i have a spare time, i will do it and share here promise / not workin on graphics many times ;) )


All times are GMT -5. The time now is 06:59.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com