CorelDraw X21 SetPosition on a DXF import macro is not compatible with X6-X19 versions.
Working X19 script code that gives the "Run-time error '91' Object variable or with block variable not set" in X21
Version X19 origin is 0,0 bottom left by default without any other settings.
Would like correct X21 SETPOSITION code.
The ActiveDocument.ReferencePoint = cdrBottomLeft does not seem to help.
Thank you in Advance
ActivePage.GuidesLayer.Editable = False ActivePage.GuidesLayer.Editable = True Dim impopt As StructImportOptions Set impopt = CreateStructImportOptions impopt.MaintainLayers = True Dim impflt As ImportFilter ' Set the path for Drill time DXF file Set impflt = ActivePage.Layers("DT").ImportEx("C:\wellsite\d6unit\zDT.DXF", cdrDXF, impopt) With impflt .Projection = 0 ' FilterDXFLib.dxfTop .AutoReduceNodes = False .Scaling = 1 ' FilterDXFLib.dxfEnglish .Finish End With Dim s1 As Shape Set s1 = ActiveShape ' ****************************** Track1 ' Set begining of Drill Time Curve 5" per 100 ft s1.SetPosition 0.241, 55.681 ' Run-time error '91' Object variable or with block variable not set ' ******************************
Please, edit your question and replace the pictures with your code. You can be better helped if we are able to make some tests with the involved code...
On which code line does the error appear? And which error, if any? What does "not work" mean?