Space Automation Pro for Space Planning - VB - Visual Studio Syntax Questions

parkerbelt

Active Member
Joined
May 23, 2014
Messages
377
I've recently acquired Space Automation Pro and I'm attempting to write some VB scripts in Visual Studio - to automate the manipulation of Space Planning modulars, but I'm having a hard time getting the correct syntax to do what I would like to do.

Does anyone know where I could learn the syntax for this?

Here is a sample of the type of code that is used and what I'm trying to do, but the syntax isn't correct.

Code:
Option Strict On
#Region "Imports"


Imports System.Collections.Generic
Imports System.Text
Imports JDA.Intactix.Automation


#End Region


Public Class SpaceMenuClass
    Inherits Script


    Public Sub New()
        MyBase.New()
    End Sub


    Public Sub New(ByVal nSpaceOrFloor As Integer)
        MyBase.New(nSpaceOrFloor)
    End Sub


    Public Overrides Sub Run(Optional isSilentMode As Boolean = False)
        'Script Lines go here



Dim CurrentPlanogram As Integer

CurrentPlanogram = 0
SpacePlanning.SetActivePlanogram(CurrentPlanogram)
SpacePlanning.SelectAllDrawings()
SpacePlanning.CopyToClipboard()
CurrentPlanogram = CurrentPlanogram + 1
SpacePlanning.SetActivePlanogram(CurrentPlanogram)
SpacePlanning.PasteFromClipboard()
SpacePlanning.SelectFixture("TP INFANT PLATFORM SHELF 3X93X50", False)
' Figure out what to put between the brackets to delete all positions on the planogram
SpacePlanning.DeletePositionsWithCondition("*")




    End Sub
End Class


I've been studying the Space Automation Commands in the Space Automation, Help section of Visual Studio, but, unless I'm doing exactly what the example shows, I don't know the syntax to use to do what I would like to do. What is the best way for me to learn the syntax - Are there other resources available?


Any suggestions?
Thanks in advance!!
 
Last edited by a moderator:

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Good morning ! Did you ever find an answer for this? I am doing the same and struggling!

I ended up joining the SIG, which is a Space Automation Information Group that JDA puts out. You can ask questions on their and some people respond to questions that you ask. I also reached out to JDA's help desk with questions and issues and networked with other users in my local community. I hope that helps you - good luck!
 
Upvote 0
Hello again! I am a distributor and am having the hardest time with writing these scripts. I do not have access to the JDA community page I guess being I am a distributor and my licenses were provided by AB so technically not a customer of JDA even though I use it every day. Anyways, I thought it would be a good idea to use the script recording macro to help write a custom scripts. I was able to rename a fixture but my goal is to select all fixtures as is shown...but change the name to all of them at once. Not just one selected fixture. here is what i have so far.


Option Strict Off

Imports JDA.Intactix.Automation
Imports System.IO
ImportsJDA.Intactix.Automation.SpacePlanning
ImportsJDA.Intactix.Automation.Space.Planogram


Namespace SpaceMenuAssembly
Public ClassSpaceMenuClass
InheritsScript

PublicSub New()
MyBase.New()
End Sub

PublicSub New(ByVal nSpaceOrFloor As Integer)
MyBase.New(nSpaceOrFloor)
End Sub

PublicOverrides Sub Run(Optional isSilentMode As Boolean = False)
SpacePlanning.DeselectAllObjects()
SpacePlanning.SelectAllFixtures()
SpacePlanning.SetSelectedFixtureAttributes(SpaceFixtureFields.Name,"")


End Sub
End Class
End Namespace

I would like to set all fixture names to the segment number and fixture location ID but only see how to change for one. Do you have any idea of what I can add? I haven't had the new Space Planning long and am used to the old Space Auto Classic. Any help is appreciated as my access to JDA forums and such is limited
 
Upvote 0
Oh, one more thing, How do I add get that script to run from the ribbon with the others as a executable?
 
Upvote 0
I ended up joining the SIG, which is a Space Automation Information Group that JDA puts out. You can ask questions on their and some people respond to questions that you ask. I also reached out to JDA's help desk with questions and issues and networked with other users in my local community. I hope that helps you - good luck!

Well, I cannot delete my previous comment from today but i did Record a Script and aquire the VBScriptfile and seen that in order to have it run in SPP I need to open it in SAPRO to compile...I do not have SAPRO since the software supplier only has one SAPRO license. Is there an easier way to aquire the Space Planning SAPRO template and I can rewrite them myself in VS15 or another way to convert these recorded scripts I made to run in spp without SAPRO? Im drowning haha! My job is so much simpler and accurate with the simplicity of scripts.
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,037
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top