OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 19-09-2021, 03:59
dungbtl's Avatar
dungbtl dungbtl is offline
Senior Member
 
Join Date: Apr 2004
Posts: 153
Default Place object on all nodes

I'd like to snap some objects to all nodes within a graphic.

ex;

The source object has 36 nodes.
I draw & dupe 36 ellipse objects
Select all 36 then apply to the source object
I assume it cycles thru and applies to each node location?

Screenshots suck.
Attached Images
 
__________________
Using X4 & 2019 2020... yikes 2021

Last edited by dungbtl; 21-09-2021 at 03:25.
Reply With Quote
  #2  
Old 19-01-2022, 04:58
dungbtl's Avatar
dungbtl dungbtl is offline
Senior Member
 
Join Date: Apr 2004
Posts: 153
Default

Have not given up and refined me search

https://forum.oberonplace.com/showpo...25&postcount=2

Works in 2019

Thanks Joe!

Quote:
Originally Posted by Joe View Post
Sounds like something that I should add to this little docker I'm working on...

But back to your question - this is certainly doable. Adding the origin points and such instantly inflate the amount of work, but in general you would have to define a ShapeRange instead the single sclip shape, then define an index to set the amount of shapes. Like this:

Code:
Sub PasteClipboardAtNodes()
    Dim s As Shape, sr As ShapeRange
    Dim sclip As ShapeRange, n As Node

    Dim Index As Integer

    Set sr = ActiveSelectionRange
    ActiveDocument.ReferencePoint = cdrCenter
        
  Set sclip = ActiveLayer.PasteEx
    
    Index = 1

    For Each s In sr
        If s.Type = cdrCurveShape Then
            For Each n In s.Curve.Nodes
                sclip.Shapes(Index).Duplicate.SetPosition n.PositionX, n.PositionY
                If Index < sclip.Shapes.Count Then Index = Index + 1 Else Index = 1
            Next n
        End If
    Next s
    
    sclip.Delete
End Sub
In this example the shapes are being cyclically placed at the curve points, hope that helps.

EDIT: The PasteEx is important (I pasted a version without it), since it returns a range instead of a single shape.
__________________
Using X4 & 2019 2020... yikes 2021
Reply With Quote
  #3  
Old 23-01-2022, 09:22
dungbtl's Avatar
dungbtl dungbtl is offline
Senior Member
 
Join Date: Apr 2004
Posts: 153
Default

Curious...

Any way to get this to do Inside corners only?
All corners are fine if not able.

Thanks a batch!
__________________
Using X4 & 2019 2020... yikes 2021
Reply With Quote
  #4  
Old 31-01-2022, 17:32
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,790
Blog Entries: 12
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default

What is an inside corner?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to find the position of all nodes in an object MikeVerDuin CorelDRAW/Corel DESIGNER VBA 2 15-02-2011 21:05
where to place a new gms file. runflacruiser Feature requests/wishlist 0 12-10-2010 17:51
place text inside box with auto size? bprice CorelDRAW/Corel DESIGNER VBA 8 08-02-2008 08:52
Python in place of VBA CgNeophyte Corel Photo-Paint VBA 1 14-10-2006 16:01
How to place a bitmap inside text or other objects? Alex FAQ 1 24-05-2005 11:01


All times are GMT -5. The time now is 15:30.


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