KHTMFile πŸ’Ύ
1.27K subscribers
1.18K photos
342 videos
386 files
465 links
Subscribe PSD AI CDR
Download Telegram
This media is not supported in your browser
VIEW IN TELEGRAM
πŸ˜‰αžŸαžΆαž€αž›αŸ’αž”αž„ CorelDRAW αž’αžΆαž“αŸ– αž€ ខ
❀2
😘😘😘😘 free samples
Media is too big
VIEW IN TELEGRAM
πŸ˜‚αžαŸ’αž‰αž»αŸ†αž“αžΌαžœαžαŸ‚αžαŸ’αžœαž›αŸ‹αž’αžΆαžšαžΏαž„αž‚αžΌαžŸαž‡αŸ’αžšαž»αž„ αž˜αžΆαž“αžαŸ‚αž…αžΉαž„αž‘αŸαž‘αžΎαž”αž‘αžΆαž“αŸ‹αž…αž·αžαŸ’αžαž’αžαž·αžαž·αž‡αž“πŸ˜‚ #CorelDRAW #Excell #CSVFILE
❀1
This media is not supported in your browser
VIEW IN TELEGRAM
αžšαž½αž…αžšαžΆαž›αŸ‹#CorelDRAW αž‘αŸ†αž“αžΆαž€αŸ‹αž‘αŸ†αž“αž„αž‘αžΈαž“αŸαŸ‡αŸ– @FreeOne_88
៨០០០ αžšαŸ€αž› αžαŸ‚αž”αŸ‰αž»αžŽαŸ’αžŽαŸ„αŸ‡ αžŸαž˜αŸ’αžšαžΆαž”αŸ‹αž”αž„αž”αŸ’αž’αžΌαž“αžαŸ’αžšαžΌαžœαž€αžΆαžš KH-Ractangle αžšαž™αŸˆαž–αŸαž›αž˜αž½αž™αžŸαž”αŸ’αžŠαžΆαž αŸαž‘αŸαŸ”#CorelDraw
 Sub NestObjects()
Dim s As Shape, sr As ShapeRange
Dim areaWidth As Double, areaHeight As Double
Dim xOffset As Double, yOffset As Double
Dim currentX As Double, currentY As Double
Dim maxHeightInRow As Double

ActiveDocument.Unit = cdrMillimeter

' Define the area where you want to nest the objects
areaWidth = 750 ' Width of the area
areaHeight = 750 ' Height of the area

Set sr = ActiveSelectionRange
If sr.Count = 0 Then
MsgBox "Please select objects to nest."
Exit Sub
End If

' Initialize the starting position and offsets
currentX = 0
currentY = 0
maxHeightInRow = 0
xOffset = 1 ' Fixed distance between objects horizontally
yOffset = 1 ' Fixed distance between objects vertically

For Each s In sr
' Check if the object fits in the current row, otherwise try rotating
If (currentX + s.SizeWidth) > areaWidth Then
s.Rotate 90
If (currentX + s.SizeWidth) > areaWidth Then
' If it still doesn't fit, move to the next row
s.Rotate -90 ' Rotate back to the original orientation
currentX = 0
currentY = currentY + maxHeightInRow + yOffset
maxHeightInRow = 0
End If
End If

' Check if the object fits in the area, otherwise stop the macro
If (currentY + s.SizeHeight) > areaHeight Then
MsgBox "Not all objects could be nested within the specified area."
Exit Sub
End If

' Move the object to the current position
s.SetPosition currentX, currentY

' Update the current position and the max height in the current row
currentX = currentX + s.SizeWidth + xOffset
If s.SizeHeight > maxHeightInRow Then
maxHeightInRow = s.SizeHeight
End If
Next s
End Sub
Private Declare  Function GetAsyncKeyState Lib "user32" (ByVal vKey&) As Long 

Add code
PtrSafe
αž’αŸ’αžœαžΎαžŠαŸ„αž™αžŠαŸƒαž€αŸαž™αžΌαžš αž”αŸ’αžšαžΎαž‡αŸ†αž“αž½αž™αž€αŸαž›αžΏαž“ αžαŸ’αž‰αž»αŸ†αž‡αŸ’αžšαžΎαžŸαžšαžΎαžŸαž‡αŸ†αž“αž½αž™αž αžΎαž™ αž”αŸ‚αž”αž“αŸαŸ‡αŸ”
Step 2: Add VBA Code to the UserForm
UserForm Code
Add the following code to the UserForm:
Private Sub btnExport_Click()
' Call the export function with user inputs
ExportFiles txtFilePath.Text, chkDXF.Value, chkEPS.Value, chkPLT.Value
End Sub

Private Sub btnCancel_Click()
' Unload the form
Unload Me
End Sub

Private Sub btnBrowse_Click()
' Call the function to browse for a folder
txtFilePath.Text = BrowseForFolder("Select a folder for export")
End Sub

Function BrowseForFolder(Optional title As String = "Select a folder") As String
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
With fd
.Title = title
If .Show = -1 Then ' If the user selects a folder
BrowseForFolder = .SelectedItems(1)
Else ' If the user cancels
BrowseForFolder = ""
End If
End With
End Function
Step 3: Update the Module Code
Module Code
Add the following code to a new or existing module: